上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 37 下一页
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2017-10-17 17:15 immjc 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2017-10-17 16:01 immjc 阅读(110) 评论(0) 推荐(0) 编辑
摘要: std::vector 向量是表示可以动态改变大小的数组的序列容器。就像数组一样,向量为它们的元素使用连续的存储位置,这意味着它们的元素也可以使用对其元素的常规指针的偏移进行访问,并且与数组中一样有效。但是与数组不同的是,它们的大小可以动态地改变,其存储由容器自动处理。在内部,向量使用动态分配的数组 阅读全文
posted @ 2017-10-17 13:34 immjc 阅读(4134) 评论(0) 推荐(0) 编辑
摘要: Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th 阅读全文
posted @ 2017-10-16 18:52 immjc 阅读(855) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文
posted @ 2017-10-16 17:43 immjc 阅读(776) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2017-10-13 22:17 immjc 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 比较两个字符串A和B,确定A中是否包含B中所有的字符。字符串A和B中的字符都是 大写字母 注意事项 在 A 中出现的 B 字符串里的字符不需要连续或者有序。 样例 给出 A = "ABCD" B = "ACD",返回 true 给出 A = "ABCD" B = "AABC", 返回 false 思 阅读全文
posted @ 2017-10-13 20:08 immjc 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2017-10-13 11:25 immjc 阅读(104) 评论(0) 推荐(0) 编辑
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2017-10-13 10:44 immjc 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-10-12 11:35 immjc 阅读(164) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 37 下一页