欢迎来到PJCK的博客

摘要: In a binary tree, the root node is at depth 0, and children of each depth knode are at depth k+1. Two nodes of a binary tree are cousins if they have 阅读全文
posted @ 2019-04-28 22:42 PJCK 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(117) 评论(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 阅读(133) 评论(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 阅读(149) 评论(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 阅读(167) 评论(0) 推荐(0) 编辑