Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n ...
分类:
其他好文 时间:
2016-09-18 07:49:14
阅读次数:
183
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 array which gives the sum of ...
分类:
其他好文 时间:
2016-09-18 06:36:28
阅读次数:
145
Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + ...
分类:
其他好文 时间:
2016-09-18 01:16:08
阅读次数:
173
Problem Description Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky. ...
分类:
其他好文 时间:
2016-09-17 21:50:48
阅读次数:
153
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements ...
分类:
其他好文 时间:
2016-09-17 15:01:06
阅读次数:
149
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return ...
分类:
其他好文 时间:
2016-09-17 12:03:09
阅读次数:
111
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:
其他好文 时间:
2016-09-17 11:59:59
阅读次数:
113
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD ...
Our eyes do not show a lack of beauty, but a lack of observation. 世上不是缺少美,而是缺少发现美的眼睛。 Don't pay too much attention on people's appearance. Try to find ...
分类:
其他好文 时间:
2016-09-17 07:11:36
阅读次数:
109
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-09-17 00:32:49
阅读次数:
152