发布时间:2015-03-22 16:54:07
//'?' Matches any single character.//'*' Matches any sequence of characters (including the empty sequence).////The matching should cover the entire input string (not partial).////The function prototype should be://bool isMatch(const char *s, const char *p)////Some examples://isMatch("aa.........【阅读全文】
发布时间:2015-03-22 16:53:33
//Given an unsorted array of integers, find the length of the longest consecutive elements sequence.////For example,//Given [100, 4, 200, 1, 3, 2],//The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4.////Your algorithm should run in O(n) complexity.impor.........【阅读全文】
发布时间:2015-03-22 16:52:59
//Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).////For example://Given binary tree {3,9,20,#,#,15,7},// 3// / \// 9 20// / \// 15 7//return .........【阅读全文】
发布时间:2015-03-22 16:52:12
//Given a binary tree, return the inorder traversal of its nodes' values.////For example://Given binary tree {1,#,2,3},// 1// \// 2// /// 3//return [1,3,2].////Note: Recursive solution is trivial, could you do it iteratively?import ja.........【阅读全文】
发布时间:2015-03-22 16:51:21
//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 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).////Find the m.........【阅读全文】