49. Group Anagrams 题目 Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "…
分类:LeetCode题目解答
48. Rotate Image
48. Rotate Image 题目 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (cl…
50. Pow(x, n)
题目 Implement pow(x, n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: …
51. N-Queens
题目 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack …
52. N-Queens II
52. N-Queens II 题目 Follow up for N-Queens problem. Now, instead outputting board configurations, return the to…
54. Spiral Matrix
54. Spiral Matrix 题目 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix i…
53. Maximum Subarray
53. Maximum Subarray 题目 Find the contiguous subarray within an array (containing at least one number) which ha…
55. Jump Game
55. Jump Game 题目 Given an array of non-negative integers, you are initially positioned at the first index of t…
57. Insert Interval
57. Insert Interval 题目 Given a set of non-overlapping intervals, insert a new interval into the intervals (mer…
56. Merge Intervals
56. Merge Intervals 题目 Given a collection of intervals, merge all overlapping intervals. For example, Given [1…
58. Length of Last Word
58. Length of Last Word 题目 Given a string s consists of upper/lower-case alphabets and empty space characters …
60 Permutation Sequence
60 Permutation Sequence 题目 The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labe…