上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页

2015年5月18日

摘要: 题目:Sort a linked list using insertion sort.代码:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ... 阅读全文
posted @ 2015-05-18 20:00 承续缘 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.代码:/** * Definition for singly-linked list. * struc... 阅读全文
posted @ 2015-05-18 19:21 承续缘 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.代码:/**... 阅读全文
posted @ 2015-05-18 14:50 承续缘 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is gr... 阅读全文
posted @ 2015-05-18 14:40 承续缘 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which ... 阅读全文
posted @ 2015-05-18 11:23 承续缘 阅读(224) 评论(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, 1 ... 阅读全文
posted @ 2015-05-18 10:29 承续缘 阅读(159) 评论(0) 推荐(0) 编辑

2015年5月17日

摘要: 题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsu... 阅读全文
posted @ 2015-05-17 22:19 承续缘 阅读(284) 评论(0) 推荐(0) 编辑

2015年5月16日

摘要: 题目: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 @ 2015-05-16 23:57 承续缘 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest... 阅读全文
posted @ 2015-05-16 23:09 承续缘 阅读(143) 评论(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... 阅读全文
posted @ 2015-05-16 21:53 承续缘 阅读(193) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页

导航