摘要:
Example 1: Given the following tree [3,9,20,null,null,15,7]: Return true. Example 2: Given the following tree [1,2,2,3,3,null,null,4,4]: Return false. 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(89)
评论(0)
推荐(0)
摘要:
Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Example 1: Input: 11 Out 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(83)
评论(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]). F 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(106)
评论(0)
推荐(0)
摘要:
Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other wo 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(112)
评论(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 @ 2018-11-30 15:17
bernieloveslife
阅读(92)
评论(0)
推荐(0)
摘要:
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(84)
评论(0)
推荐(0)
摘要:
Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: 7 Output: " 10" Note: The input will 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(88)
评论(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]). F 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(98)
评论(0)
推荐(0)
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() Removes the 阅读全文
posted @ 2018-11-30 15:17
bernieloveslife
阅读(92)
评论(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 l 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(70)
评论(0)
推荐(0)

浙公网安备 33010602011771号