String To Integer
12345678910111213141516171819202122232425262728293031/* * Implement atoi to convert a string to an integer. * Hint: Carefully consider all p
12345678910111213141516171819202122232425262728293031/* * Implement atoi to convert a string to an integer. * Hint: Carefully consider all p
1234567891011121314151617/* * Reverse digits of an integer. * Example1: x = 123, return 321 * Example2: x = -123, return -321 * If the integ
题目:一个数组中两个位置上的数的和恰为 target,求这两个位置。 123456789101112131415161718192021222324Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0]
123456789101112131415161718192021222324252627282930313233343536373839404142/* * 求两个 List 相加产生的新的一个 List。 * Input: (2 -> 4 -> 3) + (5 -
题目:求一个字符串中最长的不含重复字符的子串。(注意:子串是连续的,子序列不是连续的) 思路:记录当前字符串的最近一次出现的位置,然后更新符合题目的最长的子串长度 123456789101112131415161718public class LongestSubstringWi
1234567891011121314There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The ov
123456789101112131415/* * The string "PAYPALISHIRING" is written in a zigzag pattern on a given number * of rows like this: (you may want t
leetCode 005 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there
参考: http://www.cnblogs.com/dolphin0520/p/3920385.html 在前面我们将了很多关于同步的问题,然而在现实中,需要线程之间的协作。比如说最经典的生产者-消费者模型:当队列满时,生产者需要等待队列有空间才能继续往里面放入商品,
参考资料: http://www.cnblogs.com/dolphin0520/p/3920397.html 《Java编程思想》 http://www.itzhai.com/the-introduction-and-use-of-a-countdownlatch.h