上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 50 下一页
摘要: Given a non-empty string str and an integer k, rearrange the string such that the same characters are at least distance k from each other. All input s 阅读全文
posted @ 2018-03-12 05:29 轻风舞动 阅读(4145) 评论(0) 推荐(0) 编辑
摘要: 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 轻风舞动 阅读(675) 评论(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 轻风舞动 阅读(435) 评论(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 轻风舞动 阅读(470) 评论(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 轻风舞动 阅读(336) 评论(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 轻风舞动 阅读(391) 评论(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 轻风舞动 阅读(351) 评论(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 轻风舞动 阅读(790) 评论(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 轻风舞动 阅读(252) 评论(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 轻风舞动 阅读(957) 评论(0) 推荐(0) 编辑
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 50 下一页