
leetcode刷题笔记
文章平均质量分 62
leetcode
ClaymoreT
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
300. Longest Increasing Subsequence
Given an integer array nums, return the length of the longest strictly increasing subsequence.A subsequence is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example,原创 2021-09-10 14:32:08 · 127 阅读 · 0 评论 -
137. Single Number II
Given an integer array nums whereevery element appears three times except for one, which appears exactly once. Find the single element and return it.You mustimplement a solution with a linear runtime complexity and useonly constantextra space.Examp...原创 2021-09-03 16:50:10 · 118 阅读 · 0 评论 -
125. Valid Palindrome
Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Example 1:Input: s = "A man, a plan, a canal: Panama"Output: trueExplanation: "amanaplanacanalpanama" is a palindrome.Example 2:I.原创 2021-05-06 21:13:52 · 104 阅读 · 0 评论 -
17.19. Missing Two LCCI
You are given an array with all the numbers from 1 to N appearing exactly once, except for two number that is missing. How can you find the missing number in O(N) time and O(1) space?You can return ...原创 2020-04-18 14:28:34 · 153 阅读 · 0 评论 -
54. Spiral Matrix(螺旋矩阵)
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[[ 1, 2, 3 ],[ 4, 5, 6 ],[ 7, 8, 9 ]]Output: [1,2,3,6,9,8,7,4,5]...原创 2020-02-05 12:44:15 · 212 阅读 · 0 评论 -
287 Find the Duplicate Number(寻找重复数)
题目描述Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate numb...原创 2020-02-04 12:18:33 · 128 阅读 · 0 评论 -
40. Combination Sum II
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidateswhere the candidate numbers sums to target.Each number in candidatesmay...原创 2020-02-03 13:38:02 · 109 阅读 · 0 评论 -
1275. Find Winner on a Tic Tac Toe Game(找出井字棋获胜者)
题目描述:Tic-tac-toe is playedbytwo players A and B on a3x3grid.Here are the rules of Tic-Tac-Toe:Players take turns placing characters into empty squares (" ").The first player A always plac...原创 2020-01-28 19:25:22 · 649 阅读 · 0 评论 -
9. Palindrome Number
题目描述:Determine whether an integer is a palindrome. An integerisapalindrome when itreads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: fal...原创 2019-08-26 21:31:45 · 107 阅读 · 0 评论 -
7. Reverse Integer
题目描述Given a 32-bit signed integer, reverse digits of an integer.Example 1: Input: 123 Output: 321Example 2: Input: -123 Output: -321Example 3: ...原创 2019-08-25 15:47:47 · 146 阅读 · 0 评论