摘要: 题目: 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 f 阅读全文
posted @ 2015-11-27 12:35 YRB 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer, write a function to determine if it is a power of two. 链接: http://leetcode.com/problems/power-of-two/ 题解: 验证一个数是否是2的幂次,我们可以使用(n 阅读全文
posted @ 2015-11-27 11:43 YRB 阅读(237) 评论(0) 推荐(0) 编辑