摘要:
题目描述:Given an integer, write a function to determine if it is a power of two.解题思路:判断方法主要依据2的N次幂的特点:仅有首位为1,其余各位都为0.代码如下:public class Solution { publ... 阅读全文
摘要:
题目描述: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... 阅读全文
摘要:
题目描述: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... 阅读全文