2017年3月20日

164. Maximum Gap (Array; sort)

摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 阅读全文

posted @ 2017-03-20 23:55 joannae 阅读(89) 评论(0) 推荐(0) 编辑

162. Find Peak Element (Array; Divide-and-Conquer)

摘要: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文

posted @ 2017-03-20 21:40 joannae 阅读(113) 评论(0) 推荐(0) 编辑

160. Intersection of Two Linked Lists (List;Two-Pointers)

摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘ 阅读全文

posted @ 2017-03-20 21:01 joannae 阅读(105) 评论(0) 推荐(0) 编辑

导航