摘要: 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 front 阅读全文
posted @ 2017-07-14 23:00 白天黑夜每日c 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2017-07-14 12:12 白天黑夜每日c 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
posted @ 2017-07-14 12:11 白天黑夜每日c 阅读(390) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2017-07-14 12:11 白天黑夜每日c 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or 阅读全文
posted @ 2017-07-14 12:10 白天黑夜每日c 阅读(174) 评论(0) 推荐(0) 编辑