加载中...
分类详情
简单 分类
1078-Bigram 分词(Occurrences After Bigram)
原文链接: https://leetcode-cn.com/problems/occurrences-after-bigram 英文原文Given two strings first and second, consider occurrences in some text of the form "first second third", where second comes immediately after first, and third comes immediately after …
2021-12-03
1089-复写零(Duplicate Zeros)
原文链接: https://leetcode-cn.com/problems/duplicate-zeros 英文原文Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to the right. Note that elements beyond the length of the original array are not wri…
2021-12-03
1103-分糖果 II(Distribute Candies to People)
原文链接: https://leetcode-cn.com/problems/distribute-candies-to-people 英文原文We distribute some number of candies, to a row of n = num_people people in the following way: We then give 1 candy to the first person, 2 candies to the second person, and so on …
2021-12-03
1114-按序打印(Print in Order)
原文链接: https://leetcode-cn.com/problems/print-in-order 英文原文Suppose we have a class: public class Foo { public void first() { print("first"); } public void second() { print("second"); } public void third() { print("third"); } } The same instance of Foo…
2021-12-03
1108-IP 地址无效化(Defanging an IP Address)
原文链接: https://leetcode-cn.com/problems/defanging-an-ip-address 英文原文Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Output…
2021-12-03
1154-一年中的第几天(Day of the Year)
原文链接: https://leetcode-cn.com/problems/day-of-the-year 英文原文Given a string date representing a Gregorian calendar date formatted as YYYY-MM-DD, return the day number of the year. Example 1: Input: date = "2019-01-09" Output: 9 Explanation: Given date …
2021-12-03
1175-质数排列(Prime Arrangements)
原文链接: https://leetcode-cn.com/problems/prime-arrangements 英文原文Return the number of permutations of 1 to n so that prime numbers are at prime indices (1-indexed.) (Recall that an integer is prime if and only if it is greater than 1, and cannot be writ…
2021-12-03
1184-公交站间的距离(Distance Between Bus Stops)
原文链接: https://leetcode-cn.com/problems/distance-between-bus-stops 英文原文A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops where distance[i] is the distance between the stops numbe…
2021-12-03
1185-一周中的第几天(Day of the Week)
原文链接: https://leetcode-cn.com/problems/day-of-the-week 英文原文Given a date, return the corresponding day of the week for that date. The input is given as three integers representing the day, month and year respectively. Return the answer as one of the f…
2021-12-03