摘要: 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 北叶青藤 阅读(187) 评论(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 北叶青藤 阅读(230) 评论(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 北叶青藤 阅读(221) 评论(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 北叶青藤 阅读(178) 评论(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 北叶青藤 阅读(375) 评论(0) 推荐(0)
摘要: Given two sorted integer arrays A and B, merge B into A as one sorted array. Notice You may assume that A has enough space (size that is greater or eq 阅读全文
posted @ 2016-07-01 10:41 北叶青藤 阅读(148) 评论(0) 推荐(0)
摘要: Remove Duplicates from Sorted Array I Given a sorted array, remove the duplicates in place such that each element appear only once and return the new 阅读全文
posted @ 2016-07-01 08:49 北叶青藤 阅读(159) 评论(0) 推荐(0)
摘要: 560. Subarray Sum Equals K Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to  阅读全文
posted @ 2016-07-01 07:57 北叶青藤 阅读(231) 评论(0) 推荐(0)
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product. Example For example, given the array [2,3 阅读全文
posted @ 2016-07-01 05:44 北叶青藤 阅读(202) 评论(0) 推荐(0)
摘要: Given a sorted (increasing order) array, Convert it to create a binary tree with minimal height. Example Given [1,2,3,4,5,6,7], return 4 / \ 2 6 / \ / 阅读全文
posted @ 2016-07-01 05:31 北叶青藤 阅读(233) 评论(0) 推荐(0)