摘要:
题目描述:Given an integer, write a function to determine if it is a power of two.解题思路:判断方法主要依据2的N次幂的特点:仅有首位为1,其余各位都为0.代码如下:public class Solution { publ... 阅读全文
posted @ 2016-01-05 14:48
scottwang
阅读(276)
评论(0)
推荐(0)
摘要:
题目描述: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 fr... 阅读全文
posted @ 2016-01-05 14:22
scottwang
阅读(229)
评论(0)
推荐(0)
摘要:
题目描述: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 fr... 阅读全文
posted @ 2016-01-05 14:22
scottwang
阅读(160)
评论(0)
推荐(0)
浙公网安备 33010602011771号