摘要:
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return all 阅读全文
posted @ 2018-03-10 15:42
轻风舞动
阅读(695)
评论(0)
推荐(0)
摘要:
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique BST' 阅读全文
posted @ 2018-03-10 15:22
轻风舞动
阅读(452)
评论(0)
推荐(0)
摘要:
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i 阅读全文
posted @ 2018-03-10 09:17
轻风舞动
阅读(495)
评论(0)
推荐(0)
摘要:
Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a 阅读全文
posted @ 2018-03-10 08:53
轻风舞动
阅读(354)
评论(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). Find 阅读全文
posted @ 2018-03-10 08:39
轻风舞动
阅读(403)
评论(0)
推荐(0)
摘要:
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an arra 阅读全文
posted @ 2018-03-10 08:23
轻风舞动
阅读(363)
评论(0)
推荐(0)
摘要:
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). You are given a target va 阅读全文
posted @ 2018-03-10 08:13
轻风舞动
阅读(805)
评论(0)
推荐(0)
摘要:
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E 阅读全文
posted @ 2018-03-10 07:38
轻风舞动
阅读(268)
评论(0)
推荐(0)
摘要:
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead 阅读全文
posted @ 2018-03-10 07:29
轻风舞动
阅读(988)
评论(0)
推荐(0)
摘要:
Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". Update (2015-02-12):For C pr 阅读全文
posted @ 2018-03-10 06:43
轻风舞动
阅读(1041)
评论(0)
推荐(0)
摘要:
Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is 阅读全文
posted @ 2018-03-10 02:40
轻风舞动
阅读(1497)
评论(0)
推荐(0)

浙公网安备 33010602011771号