摘要: 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 阅读全文
posted @ 2020-04-21 23:25 littledy 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-21 22:28 littledy 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Problem : Design a stack which supports the following operations. Implement the CustomStack class: CustomStack(int maxSize) Initializes the object wit 阅读全文
posted @ 2020-04-21 21:31 littledy 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-21 20:33 littledy 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-21 01:09 littledy 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-21 00:15 littledy 阅读(88) 评论(0) 推荐(0) 编辑