摘要: Ugly number is a number that only have factors 2, 3and 5. Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, 5 阅读全文
posted @ 2017-01-10 09:42 璨璨要好好学习 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Implement a stack with min() function, which will return the smallest number in the stack. It should support push, pop and min operation all in O(1) c 阅读全文
posted @ 2017-01-10 06:37 璨璨要好好学习 阅读(120) 评论(0) 推荐(0) 编辑