随笔分类 -  单调栈

 
Bad Hair Day_单调栈
摘要:Description Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wa 阅读全文
posted @ 2016-10-07 22:42 阿宝的锅锅 阅读(132) 评论(0) 推荐(0)
Terrible Sets_单调栈
摘要:Description Let N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elem 阅读全文
posted @ 2016-10-07 22:26 阿宝的锅锅 阅读(197) 评论(0) 推荐(0)
单调栈基本内容
摘要:转自http://blog.csdn.net/liujian20150808/article/details/50752861 单调栈的定义: 单调栈就是栈内元素单调递增或者单调递减的栈,单调栈只能在栈顶操作。 为了更好的理解单调栈,则可将单调栈用生活情形模拟实现,例如: 我们借用拿号排队的场景来说 阅读全文
posted @ 2016-10-07 16:02 阿宝的锅锅 阅读(189) 评论(0) 推荐(0)