Given an array S of n integers, are there elements a, b, c in&n…
标签:LeetCode题目解答
[LeetCode] Longest Common Prefix 最长共同前缀
Write a function to find the longest common prefix string amongst an array of strings. If there is no c…
[LeetCode] Integer to Roman 整数转化成罗马数字
Roman numerals are represented by seven different symbols: I, V, X, L, C, …
[LeetCode] Roman to Integer 罗马数字转化成整数
Roman numerals are represented by seven different symbols: I, V, X, L, C, …
[LeetCode] Container With Most Water 装最多水的容器,Trapping Rain Water 收集雨水
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai).…
[LeetCode] Regular Expression Matching 正则表达式匹配,Wildcard Matching
Given an input string (s) and a pattern (p), implement regular expression matching with support for&nbs…
[LeetCode] String to Integer (atoi) 字符串转为整数
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible …
[LeetCode] Palindrome Number 验证回文数字
Determine whether an integer is a palindrome. An integer is a palindrome when it re…
[LeetCode] Reverse Integer 翻转整数
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to sh…
[LeetCode] ZigZag Converesion 之字型转换字符串
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like thi…
[LeetCode] Median of Two Sorted Arrays 两个有序数组的中位数
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the …
[LeetCode] Longest Palindromic Substring 最长回文子串,Palindrome Number,Validate Palindrome,Palindrome Partitioning,Palindrome Partitioning II,Palindrome Partitioning II 拆分回文串之二,Manacher's Algorithm 马拉车算法
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length o…