上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Example 2: 阅读全文
posted @ 2019-07-17 18:33 月半榨菜 阅读(72) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binar 阅读全文
posted @ 2019-07-17 17:56 月半榨菜 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any 阅读全文
posted @ 2019-07-10 18:24 月半榨菜 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 堆+链表 时间复杂度O(nlogk) 阅读全文
posted @ 2019-07-10 17:33 月半榨菜 阅读(102) 评论(0) 推荐(0) 编辑
摘要: iven two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: 阅读全文
posted @ 2019-07-09 21:38 月半榨菜 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2019-07-09 21:08 月半榨菜 阅读(61) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2019-07-09 20:47 月半榨菜 阅读(63) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order 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]). Y 阅读全文
posted @ 2019-07-09 15:14 月半榨菜 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文
posted @ 2019-07-09 10:26 月半榨菜 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nodes its 阅读全文
posted @ 2019-07-08 22:08 月半榨菜 阅读(84) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页