摘要:
Problem : Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() R 阅读全文
摘要:
Problem : 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 阅读全文
摘要:
Problem : Design a stack which supports the following operations. Implement the CustomStack class: CustomStack(int maxSize) Initializes the object wit 阅读全文
摘要:
Problem : 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 阅读全文
摘要:
Problem : You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there e 阅读全文
摘要:
Problem : Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N. If there are 阅读全文