摘要: Sliding Window MaximumGiven an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can... 阅读全文
posted @ 2015-07-18 18:43 Eason Liu 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 双栈排序题目描述请编写一个程序,按升序对栈进行排序(即最大元素位于栈顶),要求最多只能使用一个额外的栈存放临时数据,但不得将元素复制到别的数据结构中。给定一个int[]numbers(C++中为vector),其中第一个元素为栈顶,请返回排序后的栈。请注意这是一个栈,意味着排序过程中你只能访问到第一... 阅读全文
posted @ 2015-07-18 13:50 Eason Liu 阅读(470) 评论(0) 推荐(0) 编辑