上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 119 下一页
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2017-06-14 15:18 鸭子船长 阅读(235) 评论(0) 推荐(0)
摘要: I、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. 阅读全文
posted @ 2017-06-14 12:33 鸭子船长 阅读(132) 评论(0) 推荐(0)
摘要: 数组指针(也称行指针)定义 int (*p)[n];()优先级高,首先说明p是一个指针,指向一个整型的一维数组,这个一维数组的长度是n,也可以说是p的步长。也就是说执行p+1时,p要跨过n个整型数据的长度。 如要将二维数组赋给一指针,应这样赋值:int a[3][4];int (*p)[4]; // 阅读全文
posted @ 2017-06-14 11:02 鸭子船长 阅读(199) 评论(0) 推荐(0)
摘要: Given a string S and a string T, count the number of distinct subsequences ofT inS. A subsequence of a string is a new string which is formed from the 阅读全文
posted @ 2017-06-14 00:00 鸭子船长 阅读(3017) 评论(0) 推荐(0)
摘要: 1、 Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to N 阅读全文
posted @ 2017-06-13 18:16 鸭子船长 阅读(163) 评论(0) 推荐(0)
摘要: 1、Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] 阅读全文
posted @ 2017-06-13 16:11 鸭子船长 阅读(290) 评论(0) 推荐(0)
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2017-06-13 16:03 鸭子船长 阅读(193) 评论(0) 推荐(0)
摘要: 1、 Say you have an array for which the i th element is the price of a given stock on day i . If you were only permitted to complete at most one transa 阅读全文
posted @ 2017-06-13 15:42 鸭子船长 阅读(323) 评论(0) 推荐(0)
摘要: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, Return 6. 阅读全文
posted @ 2017-06-13 14:59 鸭子船长 阅读(934) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2017-06-13 12:40 鸭子船长 阅读(350) 评论(0) 推荐(0)
上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 119 下一页