上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 76 下一页
摘要: 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)
摘要: 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)
摘要: 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 n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3 Output: 5 Explanation: Given n = 3, the 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(104) 评论(0) 推荐(0)
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] Follow up: Recursive so 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(61) 评论(0) 推荐(0)
摘要: 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)
摘要: SQL Schema There is a table World + + + + + + | name | continent | area | population | gdp | + + + + + + | Afghanistan | Asia | 652230 | 25500100 | 20 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(95) 评论(0) 推荐(0)
摘要: Given a non negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(109) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 76 下一页