加载中...
分类详情
简单 分类
1470-重新排列数组(Shuffle the Array)
原文链接: https://leetcode-cn.com/problems/shuffle-the-array 英文原文Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Example 1: Input: nums = [2,5,1,3,4,7], n = 3 O…
2021-12-03
1496-判断路径是否相交(Path Crossing)
原文链接: https://leetcode-cn.com/problems/path-crossing 英文原文Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each representing moving one unit north, south, east, or west, respectively. You start at the origin (0, 0) on a 2D plane and walk on …
2021-12-03
1518-换酒问题(Water Bottles)
原文链接: https://leetcode-cn.com/problems/water-bottles 英文原文Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full water bottle. The operation of drinking a full water bottle turns it into an empty bottle. Ret…
2021-12-03
1528-重新排列字符串(Shuffle String)
原文链接: https://leetcode-cn.com/problems/shuffle-string 英文原文Given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the ith position moves to indices[i] in the shuffled string. Return t…
2021-12-03
1556-千位分隔数(Thousand Separator)
原文链接: https://leetcode-cn.com/problems/thousand-separator 英文原文Given an integer n, add a dot (".") as the thousands separator and return it in string format. Example 1: Input: n = 987 Output: "987" Example 2: Input: n = 1234 Output: "1.234" Example 3:…
2021-12-03
1544-整理字符串(Make The String Great)
原文链接: https://leetcode-cn.com/problems/make-the-string-great 英文原文Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: 0 <= i <= s.length - 2 s[i] is a …
2021-12-03