上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2015-03-04 09:17 mrpod2g 阅读(135) 评论(0) 推荐(0)
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-03-03 17:28 mrpod2g 阅读(128) 评论(0) 推荐(0)
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-03-02 23:11 mrpod2g 阅读(124) 评论(0) 推荐(0)
摘要: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2015-02-28 13:35 mrpod2g 阅读(144) 评论(0) 推荐(0)
摘要: Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].用递归... 阅读全文
posted @ 2015-02-27 15:56 mrpod2g 阅读(86) 评论(0) 推荐(0)
摘要: Rotate an array ofnelements to the right byksteps.For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4].空间复杂度为O(1):publi... 阅读全文
posted @ 2015-02-26 13:40 mrpod2g 阅读(81) 评论(0) 推荐(0)
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ... 阅读全文
posted @ 2015-02-25 14:38 mrpod2g 阅读(218) 评论(0) 推荐(0)
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2015-02-15 16:00 mrpod2g 阅读(97) 评论(0) 推荐(0)
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2015-02-15 14:16 mrpod2g 阅读(119) 评论(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 le... 阅读全文
posted @ 2015-02-11 21:00 mrpod2g 阅读(100) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页