摘要: 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10. 阅读全文
posted @ 2017-04-24 11:14 DevinGu 阅读(216) 评论(0) 推荐(0)
摘要: Alt+回车 导入包,自动修正Ctrl+N 查找类Ctrl+Shift+N 查找文件Ctrl+Alt+L 格式化代码Ctrl+Alt+O 优化导入的类和包Alt+Insert 生成代码(如get,set方法,构造函数等)Ctrl+E或者Alt+Shift+C 最近更改的代码Ctrl+R 替换文本Ct 阅读全文
posted @ 2017-04-22 15:30 DevinGu 阅读(221) 评论(0) 推荐(0)
摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s 阅读全文
posted @ 2017-04-18 22:53 DevinGu 阅读(239) 评论(0) 推荐(0)
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2017-04-18 21:46 DevinGu 阅读(186) 评论(0) 推荐(0)
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文
posted @ 2017-04-13 21:29 DevinGu 阅读(195) 评论(0) 推荐(0)
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-04-13 21:00 DevinGu 阅读(216) 评论(0) 推荐(0)
摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文
posted @ 2017-04-11 21:25 DevinGu 阅读(193) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You a 阅读全文
posted @ 2017-04-11 20:40 DevinGu 阅读(217) 评论(0) 推荐(0)
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: 阅读全文
posted @ 2017-04-11 20:11 DevinGu 阅读(288) 评论(0) 推荐(0)
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off 阅读全文
posted @ 2017-03-09 22:32 DevinGu 阅读(264) 评论(0) 推荐(0)