Fork me on GitHub
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页
摘要: Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exam 阅读全文
posted @ 2017-05-19 22:55 hellowOOOrld 阅读(79) 评论(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). For example, the 32-bit 阅读全文
posted @ 2017-05-19 22:37 hellowOOOrld 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 阅读全文
posted @ 2017-05-19 15:13 hellowOOOrld 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2017-05-19 10:46 hellowOOOrld 阅读(169) 评论(0) 推荐(0) 编辑
摘要: TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
posted @ 2017-05-18 14:28 hellowOOOrld 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2017-05-18 08:58 hellowOOOrld 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Trivia: This problem was inspired by this original tweet by Max Howell: G 阅读全文
posted @ 2017-05-17 21:14 hellowOOOrld 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one cha 阅读全文
posted @ 2017-05-17 17:32 hellowOOOrld 阅读(415) 评论(0) 推荐(0) 编辑
摘要: Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only has one parent process, but may have 阅读全文
posted @ 2017-05-17 08:38 hellowOOOrld 阅读(352) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be 阅读全文
posted @ 2017-05-16 19:23 hellowOOOrld 阅读(406) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页