摘要: Given a linked list, remove the nth node from the end of list and return its head. Notice The minimum number of nodes in list is n. Example Given link 阅读全文
posted @ 2016-07-03 02:34 北叶青藤 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. Notice If the two linked lists have no intersection at a 阅读全文
posted @ 2016-07-03 02:12 北叶青藤 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list using insertion sort. Sort a linked list using insertion sort. Sort a linked list using insertion sort. Example Given 1->3->2->0->n 阅读全文
posted @ 2016-07-03 00:37 北叶青藤 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Implement a function to check if a linked list is a palindrome. Implement a function to check if a linked list is a palindrome. Implement a function t 阅读全文
posted @ 2016-07-02 13:08 北叶青藤 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Find K-th largest element in an array. Notice You can swap elements in the array Example In array [9,3,2,4,8], the 3rd largest element is 4. In array  阅读全文
posted @ 2016-07-02 12:03 北叶青藤 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Remove all elements from a linked list of integers that have value val. Example Given 1->2->3->3->4->5->3, val = 3, you should return the list as 1->2 阅读全文
posted @ 2016-07-02 11:24 北叶青藤 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and two values v1 and v2. Swap the two nodes in the linked list with values v1 and v2. It's guaranteed there is no duplicate value 阅读全文
posted @ 2016-07-02 11:06 北叶青藤 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Merge two given sorted integer array A and B into a new sorted integer array. Merge two given sorted integer array A and B into a new sorted integer a 阅读全文
posted @ 2016-07-02 09:59 北叶青藤 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Given a rotated sorted array, recover it to sorted array in-place. Given a rotated sorted array, recover it to sorted array in-place. Given a rotated  阅读全文
posted @ 2016-07-02 09:52 北叶青藤 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given an integers array A. Define B[i] = A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1], calculate B WITHOUT divide operation. Example For A = [1, 2, 3], 阅读全文
posted @ 2016-07-01 11:05 北叶青藤 阅读(366) 评论(0) 推荐(0) 编辑