摘要: 316. Remove Duplicate Letters321. Create Maximum Number402. Remove K Digits这三道题都用到了 stack 来求原序列中不打乱相对次序的最小子序列的技巧: 阅读全文
posted @ 2017-07-08 21:53 apanda009 阅读(157) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/u014688145/article/details/72859739 阅读全文
posted @ 2017-07-08 17:43 apanda009 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2017-07-08 16:30 apanda009 阅读(131) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2017-07-08 15:40 apanda009 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm th 阅读全文
posted @ 2017-07-08 13:40 apanda009 阅读(278) 评论(0) 推荐(0) 编辑