上一页 1 2 3 4 5 6 ··· 36 下一页
摘要: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
posted @ 2016-09-14 02:38 LiBlog 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2016-09-14 02:00 LiBlog 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and cre 阅读全文
posted @ 2016-09-14 01:15 LiBlog 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2016-09-14 00:34 LiBlog 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a 阅读全文
posted @ 2016-09-13 09:36 LiBlog 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer n and you can do operations as follow: What is the minimum number of replacements needed for n to become 1? Example 1: Exampl 阅读全文
posted @ 2016-09-13 09:15 LiBlog 阅读(264) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2016-09-13 07:18 LiBlog 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2016-09-13 05:02 LiBlog 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 阅读全文
posted @ 2016-09-13 03:50 LiBlog 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes 阅读全文
posted @ 2016-09-13 01:47 LiBlog 阅读(219) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 36 下一页