摘要: 题目: Given a list, rotate the list to the right by k places, where k is non-negative. (Medium) For example:Given 1->2->3->4->5->NULL and k = 2,return 4 阅读全文
posted @ 2016-09-19 22:20 wangxiaobao1114 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the fol 阅读全文
posted @ 2016-09-19 22:16 wangxiaobao1114 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-09-19 22:15 wangxiaobao1114 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: Y 阅读全文
posted @ 2016-09-19 22:12 wangxiaobao1114 阅读(596) 评论(0) 推荐(0) 编辑