欢迎来到PJCK的博客

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要:Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2019-04-28 20:17 PJCK 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2019-04-28 18:26 PJCK 阅读(40) 评论(0) 推荐(0) 编辑
摘要:Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2019-04-28 17:35 PJCK 阅读(34) 评论(0) 推荐(0) 编辑
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2019-04-28 17:15 PJCK 阅读(36) 评论(0) 推荐(0) 编辑
摘要:Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1or 0. Example 1: 阅读全文
posted @ 2019-04-27 23:13 PJCK 阅读(49) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d 阅读全文
posted @ 2019-04-26 21:39 PJCK 阅读(25) 评论(0) 推荐(0) 编辑
摘要:Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree: 阅读全文
posted @ 2019-04-26 19:17 PJCK 阅读(32) 评论(0) 推荐(0) 编辑
摘要:Given an n-ary tree, return the postorder traversal of its nodes' values. For example, given a 3-ary tree: Return its postorder traversal as: [5,6,3,2 阅读全文
posted @ 2019-04-26 19:15 PJCK 阅读(47) 评论(0) 推荐(0) 编辑
摘要:Given an n-ary tree, return the preorder traversal of its nodes' values. For example, given a 3-ary tree: Return its preorder traversal as: [1,3,5,6,2 阅读全文
posted @ 2019-04-26 19:12 PJCK 阅读(36) 评论(0) 推荐(0) 编辑
摘要:Given a n-ary 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 le 阅读全文
posted @ 2019-04-26 18:44 PJCK 阅读(31) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2019-04-26 16:07 PJCK 阅读(35) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return the postorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterative 阅读全文
posted @ 2019-04-26 13:18 PJCK 阅读(27) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively 阅读全文
posted @ 2019-04-26 13:13 PJCK 阅读(25) 评论(0) 推荐(0) 编辑
摘要:Return any binary tree that matches the given preorder and postorder traversals. Values in the traversals pre and post are distinct positive integers. 阅读全文
posted @ 2019-04-26 10:35 PJCK 阅读(34) 评论(0) 推荐(0) 编辑
摘要:Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2019-04-26 09:12 PJCK 阅读(32) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页