Tiger's leetcode solution
Wednesday, February 10, 2016
241. Different Ways to Add Parentheses -------M!!!!
›
Q: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers an...
几道面试题
›
1.(数组、规划) 有两个序列a,b,大小都为n,序列元素的值任意整数,无序; 要求:通过交换a,b中的元素,使[序列a元素的和]与[序列b元素的和]之间的差最小。 例如: var a=[100,99,98,1,2, 3]; var b=[1, 2, 3, 4,5,4...
Friday, February 5, 2016
170. Two Sum III - Data structure design ----E
›
Design and implement a TwoSum class. It should support the following operations: add and find . add - Add the number to an internal data...
Two Sum II - Input array is sorted -E
›
Given an array of integers that is already sorted in ascending order , find two numbers such that they add up to a specific target number....
Wednesday, February 3, 2016
Given an array of pairs, find all symmetric pairs in it
›
Two pairs (a, b) and (c, d) are said to be symmetric if c is equal to b and a is equal to d. For example (10, 20) and (20, 10) are symmetri...
Find four elements a, b, c and d in an array such that a+b = c+d
›
Q: Given an array of distinct integers, find if there are two pairs (a, b) and (c, d) such that a+b = c+d, and a, b, c and d are distinct...
Check if an array can be divided into pairs whose sum is divisible by k
›
Given an array of integers and a number k, write a function that returns true if given array can be divided into pairs such that sum of eve...
‹
›
Home
View web version