14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. If there is no common p…
371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and . Example: Given …
167. Two Sum II - Input array is sorted
Given an array of integers that is already sorted in ascending order , find two numbers such that they add up …
程序员能力矩阵
转自Programmer Competency Matrix 注意:每个层次的知识都是渐增的,位于层次n,也蕴涵了你需了解所有低于层次n的知识。 Working with someone who has a good t…
292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one…
8. String to Integer (atoi)
Implement atoi which converts a string to an integer. The function first discards as many whitespace character…
6. ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want …
458. Poor Pigs
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all loo…
5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is …
21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together th…