02 2014 档案

摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 阅读全文
posted @ 2014-02-18 19:12 风云语 阅读(94) 评论(0) 推荐(0) 编辑
摘要:Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? 阅读全文
posted @ 2014-02-16 20:48 风云语 阅读(136) 评论(0) 推荐(0) 编辑
摘要:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. 阅读全文
posted @ 2014-02-16 20:28 风云语 阅读(120) 评论(0) 推荐(0) 编辑