摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Note: There may be more than one LIS combination, it 阅读全文
posted @ 2019-01-15 10:59 __Meng 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp 阅读全文
posted @ 2019-01-15 10:23 __Meng 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or 阅读全文
posted @ 2019-01-15 09:47 __Meng 阅读(144) 评论(0) 推荐(0) 编辑