
LeetCode - algorithm
lc-al
Lazyafei
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
125.Valid Palindrome - 验证回文串
Palindrome: palin-,重,再,-drome,跑,词源同dromedary,hippodrome.n.1.回文(顺读和倒读都一样的词、短语、诗句等,如:radar, rotator) 2.【生物化学】回文节,回文结构;旋转对称https://leetcode-cn.com/problems/valid-palindrome/Given a string, determine if it is a palindrome, considering only alphanumer...原创 2020-06-19 15:00:36 · 190 阅读 · 0 评论 -
1014. Best Sightseeing Pair - 最佳观光组合
Given an array A of positive integers, A[i] represents the value of the i-th sightseeing spot, and twosightseeing spots i and jhave distance j - ibetween them.The scoreof a pair (i < j) of sightseeing spots is (A[i] + A[j] + i- j) : the sum of th...原创 2020-06-17 18:23:19 · 227 阅读 · 0 评论 -
14、Longest Common Prefix - 最长公共前缀
--- 真正的勇士敢于直面菜逼的自己 Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output: "fl"Example 2:Explanation...原创 2020-06-16 11:18:48 · 260 阅读 · 0 评论 -
15、3 Sum - 三数之和
https://leetcode-cn.com/problems/3sum/Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets(三个一组) in the array which gives the sum of zero.Note:The solution set must not contain duplic原创 2020-06-12 16:59:54 · 229 阅读 · 0 评论 -
1. Two Sum - 两数之和
https://leetcode.com/problems/two-sum/Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone...原创 2019-05-10 19:27:15 · 174 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters - 无重复字符的最长子串
https://leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcbb"Ou...原创 2019-05-11 17:16:59 · 227 阅读 · 0 评论