题目原文：Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]).You are given a target value to search. If found...
题目原文：Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If found...
题目原文：Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length.Do not allocate extra space for another array, you must do this by ...
题目原文：Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modi...
在说常量指针与指针常量之前，先来看一看一个普通指针的使用int *pa 大家知道pa代表一个指向int类型值的指针.用另一种方式解读为：取pa所指向的地址内的值后，其值类型为int应该说，编译器只认识的是int型，int*型是不存在的int *pa 应该看作 int (*pa) 而非 (int*) pa
题目原文：Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: T
题目原文：Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.
题目原文：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 the three integers. You may assume that each input would h
题目原文：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 zero.Note: The solution set must
题目原文：Write a function to find the longest common prefix string amongst an array of strings.题意分析：传入多个存储在vector容器中的字符串，计算其公共最长前缀，公共最长前缀要求是连续的，与动态规划的最长公共子序列不同为减少比较次数，可以逐个寻找两个字符串之间
题目原文：Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.题意分析：把一个给出的罗马数字转换成为阿拉伯数字表示的整数解题时将罗马数字对应的阿拉伯数字依次转换出来即可，需要注意，如果存在左边的罗
题目原文：Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Subscribe to see which companies asked this question题目分析：将数字转换为
题目原文： Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (
题目原文：Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the enti
题目原文：Determine whether an integer is a palindrome. Do this without extra space.题意分析：不使用额外空间，判断给定的一个整数是否为回文整数。如果只是求回文数字很简单，题目的难度在于不使用额外的空间（此处认为除了传入参数，临时变量的使用为额外空间，运行过程中产生的栈对象不考虑）此处判断首尾是
题目原文：Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the po
题目原文： Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Subscribe to see which companies asked this question 分析：将整数倒
题目原文： The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H N
题目原文： Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.Subscrib
题目原文： There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Subscribe t