2015年11月25日

摘要: Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if ... 阅读全文
posted @ 2015-11-25 06:15 一心一念 阅读(155) 评论(0) 推荐(0)
摘要: Recover Rotated Sorted ArrayGiven a rotated sorted array, recover it to sorted array in-place.Example[4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5]ChallengeIn-pla... 阅读全文
posted @ 2015-11-25 06:04 一心一念 阅读(153) 评论(0) 推荐(0)
摘要: Merge Sorted Array IIMerge two given sorted integer array A and B into a new sorted integer array.ExampleA=[1,2,3,4]B=[2,4,5,6]return [1,2,2,3,4,4,5,6... 阅读全文
posted @ 2015-11-25 05:26 一心一念 阅读(175) 评论(0) 推荐(0)
摘要: Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Have you met this question in a real interview?YesWhich ... 阅读全文
posted @ 2015-11-25 03:16 一心一念 阅读(166) 评论(0) 推荐(0)
摘要: Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =... 阅读全文
posted @ 2015-11-25 02:49 一心一念 阅读(144) 评论(0) 推荐(0)
摘要: Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.ExampleGiven linked list: 1->2->3->4->... 阅读全文
posted @ 2015-11-25 02:14 一心一念 阅读(120) 评论(0) 推荐(0)

导航