水中的鱼

Showing posts with label two-pointer. Show all posts
Showing posts with label two-pointer. Show all posts
Friday, October 2, 2015

[Leetcode] Move Zeroes, Solution

›
Given an array  nums , write a function to move all  0 's to the end of it while maintaining the relative order of the non-zero element...
Monday, March 4, 2013

[LeetCode] Two Sum, Solution

›
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indice...
3 comments:
Thursday, February 21, 2013

[LeetCode] Valid Palindrome, Solution

›
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, ...
Sunday, January 27, 2013

[LeetCode] Container With Most Water, Solution

›
Given  n  non-negative integers  a 1 ,  a 2 , ...,  a n , where each represents a point at coordinate ( i ,  a i ).  n  vertical lines are...
Friday, January 25, 2013

[LeetCode] 3Sum Closest, Solution

›
Given an array  S  of  n  integers, find three integers in  S  such that the sum is closest to a given number, target. Return the sum of t...

[LeetCode] 3 Sum, Solution

›
Given an array  S  of  n  integers, are there elements  a ,  b ,  c  in  S  such that  a  +  b  +  c  = 0? Find all unique triplets in the...
›
Home
View web version

About Me

codingtmd
View my complete profile
Powered by Blogger.