上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 37 下一页
摘要: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl 阅读全文
posted @ 2018-12-06 14:00 fatttcat 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2018-12-05 07:48 fatttcat 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2018-12-05 07:32 fatttcat 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: divide and conquer,用merge 2 sorted list作为函 阅读全文
posted @ 2018-12-04 18:16 fatttcat 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a set of N people (numbered 1, 2, ..., N), we would like to split everyone into two groups of any size. Each person may dislike some other peopl 阅读全文
posted @ 2018-12-04 15:22 fatttcat 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two ind 阅读全文
posted @ 2018-12-04 14:40 fatttcat 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2018-12-04 13:53 fatttcat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Example 2: Example 3: Note: -100.0 < x < 100.0 n is a 32-bit signed int 阅读全文
posted @ 2018-12-04 13:28 fatttcat 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y 阅读全文
posted @ 2018-12-04 12:27 fatttcat 阅读(110) 评论(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]). Y 阅读全文
posted @ 2018-12-04 11:47 fatttcat 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 37 下一页