摘要:
http://www.lintcode.com/en/problem/permutations/# Given a list of numbers, return all possible permutations. Example For nums = [1,2,3], the permutations are: [ [1,2,3], [1,3,2], ... 阅读全文
摘要:
http://www.lintcode.com/zh-cn/problem/topological-sorting/# 给定一个有向图,图节点的拓扑排序被定义为: 对于每条有向边A--> B,则A必须排在B之前 拓扑排序的第一个节点可以是任何在图中没有其他节点指向它的节点 找到给定图的任一拓扑排序 solution Topologi... 阅读全文
摘要:
https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity?... 阅读全文
摘要:
https://leetcode.com/problems/search-in-rotated-sorted-array/ Suppose a sorted array 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). Y... 阅读全文
摘要:
https://leetcode.com/problems/search-insert-position/ Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inse... 阅读全文