摘要: 题目原文: An inversion in an array a[] is a pair of entries a[i] and a[j] such that i<j but a[i]>a[j]. Given an array, design a linearithmic algorithm to 阅读全文
posted @ 2017-07-24 20:48 evasean 阅读(1263) 评论(0) 推荐(0) 编辑
摘要: 题目原文: Stack with max. Create a data structure that efficiently supports the stack operations (push and pop) and also a return-the-maximum operation. A 阅读全文
posted @ 2017-07-24 17:32 evasean 阅读(772) 评论(3) 推荐(0) 编辑