摘要:
Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 题意 把链表循环右移k个 题解 1 class Solution { 2 pub 阅读全文
摘要:
The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following seque 阅读全文
摘要:
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: 1 class Solution { 2 public: 3 vector 阅读全文
摘要:
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
摘要:
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文