diff --git a/algorithms/array.md b/algorithms/array.md index feadbedd..1bb2597a 100644 --- a/algorithms/array.md +++ b/algorithms/array.md @@ -56,3 +56,5 @@ Arrays - Given an array, return the length of the longest increasing contiguous subarray. - E.g., `[1, 3, 2, 3, 4, 8, 7, 9]`, should return `4` because the longest increasing array is `[2, 3, 4, 8]`. - [Source](http://blog.gainlo.co/index.php/2017/02/02/uber-interview-questions-longest-increasing-subarray/). + -Merge two sorted arrays with O(1) extra space + -[Source](http://www.geeksforgeeks.org/merge-two-sorted-arrays-o1-extra-space/) diff --git a/algorithms/linked-list.md b/algorithms/linked-list.md index 67cda73f..94772fb3 100644 --- a/algorithms/linked-list.md +++ b/algorithms/linked-list.md @@ -11,3 +11,5 @@ Linked List - Given a singly linked list (a list which can only be traversed in one direction), find the item that is located at 'k' items from the end. So if the list is a, b, c, d and k is 2 then the answer is 'c'. The solution should not search the list twice. - How can you tell if a Linked List is a Palindrome? - Implement a LRU cache with O(1) runtime for all its operations. +-Detect and remove cycle in a linked list [Floyd's Algorithm] +-[Source](http://www.geeksforgeeks.org/detect-and-remove-loop-in-a-linked-list/)