摘要:
1-9 : count:9 * len:1 10-99: count:90 * len:2 100-999: count:900 * len:3 1000-9999: count: 9000 * len:4 maintain a count, len, start 阅读全文
摘要:
DP 解法, Time Complexity: O(N^2) sort based on width or height, anyone is ok. After the sorting, for each envelope, those envelopes which can fit into t 阅读全文
摘要:
TreeMap 解法: Use TreeMap to easily find the lower and higher keys, the key is the start of the interval.Merge the lower and higher intervals when neces 阅读全文