摘要:
第二遍做法:参考https://discuss.leetcode.com/topic/64624/concise-easy-to-understand-java-5ms-solution-with-explaination Actually this is a denary tree (each n 阅读全文
摘要:
我的Greedy+Heap做法: Array按start moment升序sort,Heap里按end moment升序sort,一旦到Heap里结束时间最早的气球的end,就要扔arrow,这时在heap里的气球都会被引爆 改进:因为一旦气球爆了的话,Heap里面的元素要全部清空,不需要知道Hea 阅读全文
摘要:
idea 1: suppose it takes y steps to equal each elements, then this equation stands: (min + y) * num.length == sum + (num.length-1)*y, where min + y is 阅读全文