Leecode 经典题目 JavaScript TypeScript 题解。 Leetcode's answers by JavaScript and TypeScript.
- 1.两数之和 (Two Sum)
- 4.寻找两个正序数组的中位数 (Median of Two Sorted Arrays)
- 7.整数反转 (Reverse Integer)
- 9.回文数 (Palindrome Number)
- 13.罗马数字转整数 (Roman to Integer)
- 14.最长公共前缀 (Longest Common Prefix)
- 20.有效的括号 (Valid Parentheses)
- 21.合并两个有序链表 (Merge Two Sorted Lists)
- 26.删除排序数组中的重复项 (Remove Duplicates from Sroted Array)
- 27.移除元素 (Remove Element)
- 28.实现 strStr() (Implement strStr())
- 35.搜索插入位置 (Search Insert Position)
- 38.外观数列 (Count and Say)
- 53.最大子序和 (Maximum Subarray)
- 58.最后一个单词的长度 (Length of Last World)
- 66.加一 (Plus One)
- 67.二进制求和 (Add Binary)
- 69.x 的平方根 (Sqrt(x))
- 70.爬楼梯 (Climbing Stairs)
- 83.删除排序链表中的重复元素 (Remove Duplicates from Sorted List)
- 88.合并两个有序数组 (Merge Sorted Array)
- 100.相同的树 (Same Tree)
- 101.对称二叉树(Symmetric Tree)
- 104.二叉树的最大深度 (Maximum Depth of Binary Tree)
- 108. 将有序数组转换为二叉搜索树(Convert Sorted Array to Binary Search Tree)
- 111.二叉树的最小深度(Minimum Depth of Binary Tree)
- 112.路径总和(Path Sum)
- 118.杨辉三角 (Pascal's Triangle)
- 119.杨辉三角 II (Pascal's Triangle)
- 121.买卖股票的最佳时机 (Best Time to Buy and Sell Stock)
- 125.验证回文串 (Valid Palindrome)
- 136.只出现一次的数字 (Single Number)
- 141.环形链表 (Linked List Cycle)
- 155.最小栈 (Min Stack)
- 160.相交链表(Intersection of Two Linked Lists)
- 167.两数之和 II - 输入有序数组 (Two Sum II - Input array is sorted)
- 168.Excel 表列名称 (Excel Sheet Column Title)
- 169.多数元素 (Majority Element)
- 171.Excel 表列序号 (Excel Sheet Column Number)
- 172.阶乘后的零 (Factorial Trailing Zeroes)
- 183.从不订购的客户 (Customers Who Never Order)
- 189.旋转数组 (Rotate Array)
- 190.颠倒二进制位 (Reverse Bits)
- 191.位 1 的个数 (Number of 1 Bits)
- 195.第十行 (Tenth Line)
- 196.删除重复的电子邮箱 (Delete Duplicate Emails)
- 202.快乐数 (Happy Number)
- 203.移除链表元素 (Remove Linked List Elements)
- 205.同构字符串 (Isomorphic Strings)
- 206.反转链表 (Reverse Linked List)
- 217.存在重复元素 (Contains Duplicate)
- 219.存在重复元素 II (Contains Duplicate II)
- 225.用队列实现栈 (Implement Stack using Queues)
- 226.翻转二叉树 (Invert Binary Tree)
- 231.2 的幂 (Power of Two)
- 232.用栈实现队列 (Implement Queue using Stacks)
- 234.回文链表 (Palindrome Linked List)
- 237.删除链表中的节点 (Delete Node in a Linked List)
- 242.有效的字母异位词 (Valid Anagram)
- 258.各位相加 (Add Digits)
- 263.丑数 (Ugly Number)
- 268.缺失数字 (Missing Number)
- 278.第一个错误的版本 (First Bad Version)
- 283.移动零 (Move Zeroes)
- 290.单词规律 (Word Pattern)
- 292. Nim Game
- 303.区域和检索-数组不可变 (Range Sum Query - Immutable)
- 326.3 的幂 (Power of Three)
- 338.比特位计数 (Counting Bits)
- 342.4 的幂 (Power of Four)
- 344.反转字符串 (Reverse String)
- 345.反转字符串中的元音字母 (Reverse Vowels of a String)
- 349.两个数组的交集 (Intersection of Two Arrays)
- 350.两个数组的交集(Intersection of Two Arrays II)
- 374.猜数字大小 (Guess Number Higher or Lower)
- 383.赎金信 (Ransom Note)
- 387.字符串中的第一个唯一字符 (First Unique Character in a String)
- 389.找不同 (Find the Difference)
- 412.Fizz Buzz
- 414.第三大的数(Third Maximum Number)
- 415.字符串相加 (Add Strings)
- 448.找到所有数组中消失的数字 (Find All Numbers Disappeared in an Array)
- 455.分发饼干 (Assign Cookies)
- 461.汉明距离 (Hamming Distance)
- 463.岛屿的周长 (Island Perimeter)
- 476.数字的补数 (Number Complement)
- 485.最大连续 1 的个数 (Max Consecutive Ones)
- 495.提莫攻击(Teemo Attacking)
- 496.下一个更大元素 I (Next Greater Element I)
- 500.键盘行 (Keyboard Row)
- 504.七进制数 (Base 7)
- 506.相对名次 (Relative Ranks)
- 509.斐波那契数列 (Fibonacci Number)
- 520.检测大写字母 (Detect Capital)
- 541.反转字符串 II (Reverse String II)
- 551.学生出勤记录 I (Student Attendance Record I)
- 557.反转字符串中的单词 III (Reverse Words in a String III)
- 561.数组拆分 I (Array Partition I)
- 566.重塑矩阵(Reshape the Matrix)
- 575.分糖果 (Distribute Candies)
- 581.最短无序连续子数组 (Shortest Unsorted Continuous Subarray)
- 599.两个列表的最小索引总和 (Minimum Index Sum of Two Lists)
- 605.种花问题(Can Place Flowers)
- 617.合并二叉树 (Merge Two Binary Trees)
- 643.子数组最大平均数 I(Maximum Average Subarray I)
- 645.错误的集合 (Set Mismatch)
- 657.机器人能否返回原点 (Robot Return to Origin)
- 674.最长连续递增序列(Longest Continuous Increasing Subsequence)
- 682.棒球比赛 (Baseball Game)
- 693.交替位二进制数 (Binary Number with Alternating Bits)
- 703.数据流中的第 K 大元素 (Kth Largest Element in a Stream)
- 704.二分查找 (Binary Search)
- 705.设计哈希集合 (Design HashSet)
- 706.设计哈希映射 (Design HashMap)
- 709.转换成小写字母(To Lower Case)
- 724.寻找数组的中心下标(Find Pivot Index)
- 728.自除数 (Self Dividing Numbers)
- 744.寻找比目标字母大的最小字母 (Find Smallest Letter Greater Than Target)
- 746.使用最小花费爬楼梯(Min Cost Climbing Stairs)
- 748.最短补全词(Shortest Completing Word)
- 762.二进制表示中质数个计算置位(Prime Number of Set Bits in Binary Representation)
- 766.托普利茨矩阵(Toeplitz Matrix)
- 771.宝石与石头 (Jewels and Stones)
- 796.旋转字符串 (Rotate String)
- 804.唯一摩尔斯密码词(Unique Morse Code Words)
- 806.写字符串需要的行数 (Number of Lines To Write String)
- 811.子域名访问计数 (Subdomain Visit Count)
- 819.最常见的单词(Most Common Word)
- 821.字符的最短距离 (Shortest Distance to a Character)
- 830.较大分组的位置 (Positions of Large Groups)
- 832.翻转图像 (Flipping an Image)
- 836.矩形重叠(Rectangle Overlap)
- 844.比较含退格的字符串 (Backspace String Compare)
- 852.山脉数组的峰顶索引 (Peak Index in a Mountain Array)
- 860.柠檬水找零 (Lemonade Change)
- 868.二进制间距 (Binary Gap)
- 876.链表的中间节点(Middle of the Linked List)
- 884.两句话中的不常见单词 (Uncommon Words from Two Sentences)
- 888.公平的糖果交换 (Fair Candy Swap)
- 896.单调数列(Monotonic Array)
- 897.递增顺序搜索树(Increasing Order Search Tree)
- 905.按奇偶排序数组 (Sort Array By Parity)
- 908.最小差值 I(Smallest Range I)
- 917.仅仅反转字母 (Reverse Only Letters)
- 922.按奇偶排序数组 II (Sort Array By Parity II)
- 925.长按键入 (Long Pressed Name)
- 929.独特的电子邮件地址(Unique Email Addresses)
- 933.最近的请求次数 (Number of Recent Calls)
- 938.二叉搜索树的范围和 (Range Sum of BST)
- 941.有效的山脉数组 (Valid Mountain Array)
- 942.增减字符串匹配 (DI String Match)
- 944.删列造序 (Delete Columns to Make Sorted)
- 953.验证外星语词典(Verifying an Alien Dictionary)
- 961.重复 N 次的元素 (N-Repeated Element in Size 2N Array)
- 965.单值二叉树(Univalued Binary Tree)
- 977.有序数组的平方 (Squares of a Sorted Array)
- 985.查询后的偶数和 (Sum of Even Numbers After Queries)
- 989.数组形式的整数加法 (Add to Array-Form of Integer)
- 997.找到小镇的法官(Find the Town Judge)
- 1009.十进制整数的反码 (Complement of Base 10 Integer)
- 1010.总持续时间可被 60 整除的歌曲 (Pairs of Songs With Total Durations Divisible by 60)
- 1021.删除最外层的括号 (Remove Outermost Parentheses)
- 1030.距离顺序排列矩阵单元格(Matrix Cells in Distance Order)
- 1046.最后一块石头的重量 (Last Stone Weight)
- 1047.删除字符串中的所有相邻重复项 (Remove All Adjacent Duplicates In String)
- 1051.高度检查器 (Height Checker)
- 1078.Bigram 分词 (Occurrences After Bigram)
- 1089.复写零 (Duplicate Zeros)
- 1108.IP 地址无效化(Defanging an IP Address)
- 1122.数组的相对排序(Relative Sort Array)
- 1137.第 N 个泰波那契数(N-th Tribonacci Number)
- 1154.一年中的第几天 (Day of the Year)
- 1160.拼写单词 (Find Words That Can Be Formed by Characters)
- 1170.比较字符串最小字母出现频次 (Compare Strings by Frequency of the Smallest Character)
- 1184.公交站间的距离(Distance Between Bus Stops)
- 1185.一周中的第一天 (Day_of_the_Week)
- 1189."气球"的最大数量 (Maximum Number of Balloons)
- 1200.最小绝对差 (Minimum Absolute Difference)
- 1207.独一无二的出现次数 (Unique Number of Occurrences)
- 1217.玩筹码(Minimum Cost to Move Chips to The Same Position)
- 1221.分割平衡字符串 (Split a String in Balanced Strings)
- 1232.缀点成线(Check If It Is a Straight Line)
- 1252.奇数值单元格的数目 (Cells with Odd Values in a Matrix)
- 1275.找出井字棋的获胜者(Find Winner on a Tic Tac Toe Game)
- 1281.整数的各位积和之差 (Subtract the Product and Sum of Digits of an Integer)
- 1287.有序数组中出现次数超过 25%的元素 (Element Appearing More Than 25% In Sorted Array)
- 1290.二进制链表转整数(Convert Binary Number in a Linked List to Integer)
- 1295.统计位数为偶数的数字 (Find Numbers with Even Number of Digits)
- 1299.将每个元素替换为右侧最大元素 (Replace Elements with Greatest Element on Right Side)
- 1304.和为零的 N 个唯一整数 (Find N Unique Integers Sum up to Zero)
- 1309.解码字母到整数映射 (Decrypt String from Alphabet to Integer Mapping)
- 1313.解压缩编码列表 (Decompress Run-Length Encoded List)
- 1317.将整数转换为两个无零整数的和 (Convert Integer to the Sum of Two No-Zero Integers)
- 1323.6 和 9 组成的最大数字(Maximum 69 Number)
- 1331.数组序号转换 (Rank Transform of an Array)
- 1332.删除回文子序列(Remove Palindromic Subsequences)
- 1337.方阵中战斗力最弱的 K 行 (The K Weakest Rows in a Matrix)
- 1342.将数字变成 0 的操作次数(Number of Steps to Reduce a Number to Zero)
- 1346.检查整数及其两倍数是否存在 (Check If N and Its Double Exist)
- 1351.统计有序矩阵中的负数 (Count Negative Numbers in a Sorted Matrix)
- 1356.根据数字二进制下 1 的数目排序 (Sort Integers by The Number of 1 Bits)
- 1360.日期之间隔几天 (Number of Days Between Two Dates)
- 1365.有多少小于当前数字的数字 (How Many Numbers Are Smaller Than the Current Number)
- 1370.上下升降字符串 (Increasing Decreasing String)
- 1374.生成每种字符都是奇数个的字符串 (Generate a String With Characters That Have Odd Counts)
- 1380.矩阵中的幸运数 (Lucky Numbers in a Matrix)
- 1385.两个数组间的距离值(Find the Distance Value Between Two Arrays)
- 1389.按既定顺序创建目标数组(Create Target Array in the Given Order)
- 1394.找出数组中的幸运数 (Find Lucky Integer in an Array)
- 1399.统计最大组的数目 (Count Largest Group)
- 1408.数组中的字符串匹配(String Matching in an Array)
- 1413.逐步求和得到正数的最小值 (Minimum Value to Get Positive Step by Step Sum)
- 1417.重新格式化字符串(Reformat The String)
- 1422.分割字符串的最大得分(Maximum Score After Splitting a String)
- 1431.拥有最多糖果的孩子 (Kids With the Greatest Number of Candies)
- 1436.旅行终点站 (Destination City)
- 1441.用栈操作构建数组(Build an Array With Stack Operations)
- 1446.连续字符(Consecutive Characters)
- 1450.在既定时间做作业的学生人数(Number of Students Doing Homework at a Given Time)
- 1455.检查单词是否为句中其他单词的前缀
- 1460.通过翻转子数组使两个数组相等 (Make Two Arrays Equal by Reversing Sub-arrays)
- 1464.数组中两元素的最大乘积(Maximum Product of Two Elements in an Array)
- 1470.重新排列数组 (Shuffle the Array)
- 1475.商品折扣后的最终价格 (Final Prices With a Special Discount in a Shop)
- 1480.一堆数组的动态和 (Running Sum of 1d Array)
- 1486.数组异或操作(XOR Operation in an Array)
- 1491.去掉最低工资和最高工资后的平均工资值(Average Salary Excluding the Minimum and Maximum Salary)
- 1496.判断路径是否想交 (Path Crossing)
- 1502.判断能否形成等差数列 (Can Make Arithmetic Progression From Sequence)
- 1507.转变日期格式(Reformat Date)
- 1512.好数对的数目(Number of Good Pairs)
- 1518.换酒问题 (Water Bottles)
- 1528.重新排列字符串 (Shuffle String)
- 1539.第 k 个缺失的正整数 (Kth Missing Positive Number)
- 1544.整理字符串 (Make The String Great)
- 1550.存在连续三个奇数的数组 (Three Consecutive Odds)
- 1556.千位分隔数(Thousand Separator)
- 1560.圆形赛道上经过次数最多的扇区 (Most Visited Sector in a Circular Track)
- 1572.矩阵对角线元素的和 (Matrix Diagonal Sum)
- 1576.替换所有的问号(Replace All ?'s to Avoid Consecutive Repeating Characters)
- 1582.二进制矩阵中的特殊位置(Special Positions in a Binary Matrix)
- 1588.所有奇数长度子数组的和 (Sum of All Odd Length Subarrays)
- 1598.文件夹操作日志搜集器 (Crawler Log Folder)
- 1603.设计停车系统(Design Parking System)
- 1608.特殊数组的特征值(Special Array With X Elements Greater Than or Equal X)
- 1614.括号的最大嵌套深度(Maximum Nesting Depth of the Parentheses)
- 1619.删除某些元素后的数组均值 (Mean of Array After Removing Some Elements)
- 1624.两个相同字符之间的最长子字符串 (Largest Substring Between Two Equal Characters)
- 1625.拆炸弹 (Defuse the Bomb)
- 1629.按键持续时间最长的键(Slowest Key)
- 1636.按照频率将数组升序排序(Sort Array by Increasing Frequency)
- 1640.能否连接形成数组 (Check Array Formation Through Concatenation)
- 1646.获取生成数组中的最大值(Get Maximum in Generated Array)
- 1656.设计有序流(Design an Ordered Stream)
- 1668.最大重复子字符串(Maximum Repeating Substring)
- 1662.检查两个字符串数组是否相等 (Check If Two String Arrays are Equivalent)
- 1672.最富有客户的资产总量 (Richest Customer Wealth)
- 1684.统计一致字符串的数目 (Count the Number of Consistent Strings)
- 1678.设计 Goal 解析器 (Goal Parser Interpretation)
- 1688.比赛中的配对次数 (Count of Matches in Tournament)
- 1694.重新格式化电话号码(Reformat Phone Number)
- 1700.无法吃午餐的学生数量 (Number of Students Unable to Eat Lunch)
- 1704.判断字符串的两半是否相似 (Determine if String Halves Are Alike))
- 1710.卡车上的最大单元数(Maximum Units on a Truck)
- 1716.计算力扣银行的钱 (Calculate Money in Leetcode Bank)
- 1725.可以形成最大正方形的矩形数目
- 1732.找到最高海拔(Find the Highest Altitude)
- 1736.替换隐藏数字得到的最晚时间 (Latest Time by Replacing Hidden Digits)
- 1742.盒子中小球的最大数量(Maximum Number of Balls in a Box)
- 1752.检查数组是否经排序和轮转得到(Check if Array Is Sorted and Rotated)
- 1758.生成交替二进制字符串的最少操作数(Minimum Changes To Make Alternating Binary String)
- 1768.交替合并字符串(Merge Strings Alternately)
- 1773.统计匹配检索规则的物品数量(Count Items Matching a Rule)
- 1784.检查二进制字符串字段(Check if Binary String Has at Most One Segment of Ones)
- 1790.仅执行一次字符串交换能否使两个字符串相等 (Check if One String Swap Can Make Strings Equal)
- 1796.字符串中第二大的数字(Second Largest Digit in a String)
- 1800.最大升序子数组和(Maximum Ascending Subarray Sum)
- 1805.字符串中不同整数的数目(Number of Different Integers in a String)
- 1812.判断国际象棋棋盘中一个格子的颜色(Determine Color of a Chessboard Square)
- 1816.截断句子(Truncate Sentence)
- 1822.数组元素积的符号(Sign of the Product of an Array)
- 1827.最少操作使数组递增(Minimum Operations to Make the Array Increasing)
- 1832.判断句子是否为全字母句(Check if the Sentence Is Pangram)
- 1837.K 进制表示下的各位数字总和(Sum of Digits in Base K)
- 1844.将所有数字用字符替换(Replace All Digits with Characters)
- 1848.到目标元素的最小距离(Minimum Distance to the Target Element)
- 1854.人口最多的年份(Maximum Population Year)
- 1859.将句子排序(Sorting the Sentence)
- 1863.找出所有子集的异或总和再求和(Sum of All Subset XOR Totals)
- 1869.哪种连续子字符串更长(Longer Contiguous Segments of Ones than Zeros)
- 1876.长度为三且各字符不同的子字符串(Substrings of Size Three with Distinct Characters)
- 1880.检查某单词是否等于两单词之和(Check if Word Equals Summation of Two Words)
- 1886.判断矩阵经轮转后是否一致(Determine Whether Matrix Can Be Obtained By Rotation)
- 1893.检查是否区域内所有整数都被覆盖(Check if All the Integers in a Range Are Covered)
- 1897.重新分配字符使所有字符串都相等(Redistribute Characters to Make All Strings Equal)
- 1903.字符串中的最大奇数(Largest Odd Number in String)
- 1909.删除一个元素使数组严格递增(Remove One Element to Make the Array Strictly Increasing)
- 1913.两个数对之间的最大乘积差(Maximum Product Difference Between Two Pairs)
- 1920.基于排列构建数组(Build Array from Permutation)
- 1925.统计平方和三元组的数目(Count Square Sum Triples)
- 1935.可以输入的最大单词数(Maximum Number of Words You Can Type)
- 1941.检查是否所有字符出现次数相同(Check if All Characters Have Equal Number of Occurrences)
- 1945.字符串转化后的各位数字之和(Sum of Digits of String After Convert)
- 1957.删除字符使字符串变好(Delete Characters to Make Fancy String)
- 1961.检查字符串是否为数组前缀(Check If String Is a Prefix of Array)
- 1967.作为子字符串出现在单词中的字符串数目(Number of Strings That Appear as Substrings in Word)
- 1974.使用特殊打字机键入单词的最少时间(Minimum Time to Type Word Using Special Typewriter)
- 1984.学生分数的最小差值(Minimum Difference Between Highest and Lowest of K Scores)
- 1991.找到数组的中间位置(Find the Middle Index in Array)
- 2000.反转单词前缀(Reverse Prefix of Word)
- 2006.差的绝对值为 K 的数对数目(Count Number of Pairs With Absolute Difference K)
- 2011.执行操作后的变量值(Final Value of Variable After Performing Operations)
- 2016.增量元素之间的最大差值(Maximum Difference Between Increasing Elements)
- 2022.将一维数组转变成二维数组(Convert 1D Array Into 2D Array)
- 2027.转换字符串的最少操作次数(Minimum Moves to Convert String)
- 2032.至少在两个数组中出现的值(Two Out of Three)
- 2037.使每位学生都有座位的最少移动次数(Minimum Number of Moves to Seat Everyone)
- 2047.句子中的有效单词数(Number of Valid Words in a Sentence)
- 2042.检查句子中的数字是否递增( Check if Numbers Are Ascending in a Sentence)
- 2053.数组中第K个独一无二的字符串(Kth Distinct String in an Array)
- 2057.值相等的最小索引(Smallest Index With Equal Value)
- 2068.检查两个字符串是否几乎相等(Check Whether Two Strings are Almost Equivalent)
- 2073.买票需要的时间(Time Needed to Buy Tickets)
- 2078.两栋颜色不同且距离最远的房子(Two Furthest Houses With Different Colors)
- 2085.统计出现过一次的公共字符串(Count Common Words With One Occurrence)
- 2089.找出数组排序后的目标下标(Find Target Indices After Sorting Array)
- 2094.找出3位偶数(Finding 3-Digit Even Numbers)
- 2108.找出数组中的第一个回文字符串(Find First Palindromic String in the Array)
- 2114.句子中的最多单词数(Maximum Number of Words Found in Sentences)
- 2119.反转两次的数字(A Number After a Double Reversal)
- 2124.检查是否所有-a-都在-b-之前(Check If All As Appears Before All Bs)
- 2129.将标题首字母大写(Capitalize the Title)
- 2133.检查是否每一行每一列都包含全部整数(Check if Every Row and Column Contains All Numbers)
- 2138.将字符串拆分为若干长度为 k 的组(Divide a String Into Groups of Size k)
- 2144.打折购买糖果的最小开销(Minimum Cost of Buying Candies With Discount)
- 2154.将找到的值乘以 2(Keep Multiplying Found Values by Two)
- 2160.拆分数位后四位数字的最小和(Minimum Sum of Four Digit Number After Splitting Digits)
- 2164.对奇偶下标分别排序(Sort Even and Odd Indices Independently)
- 2169.得到0的操作数(Count Operations to Obtain Zero)
- 2176.统计数组中相等且可以被整除的数对(Count Equal and Divisible Pairs in an Array)
- 2180. 统计各位数字之和为偶数的整数个数(Count Integers With Even Digit Sum)
- 2185.统计包含给定前缀的字符串(Counting Words With a Given Prefix)
- 2190.数组中紧跟 key 之后出现最频繁的数字(Most Frequent Number Following Key In an Array)
- 2148.元素计数(Count Elements With Strictly Smaller and Greater Elements)
- 2194.Excel 表中某个范围内的单元格(Cells in a Range on an Excel Sheet)
- 2200.找出数组中的所有 K 近邻下标(Find All K-Distant Indices in an Array)
- 2206.将数组划分成相等数对(Divide Array Into Equal Pairs)
- 2210.统计数组中峰和谷的数量(Count Hills and Valleys in an Array)
- 2215.找出两数组的不同(Find the Difference of Two Arrays)
- 2220.转换数字的最少位翻转次数(Minimum Bit Flips To Convert Number)
- 2224.转化时间需要的最少操作数(Minimum Number of Operations to Convert Time)
- 2231.按奇偶性交换后的最大数字(Largest Number After Digit Swaps by Parity)
- 2235.两整数相加(Add Two Integers)
- 2239.找到最接近 0 的数字(Find Closest Number to Zero)
- 2243.计算字符串的数字和(Calculate Digit Sum of a String)
- 2248.多个数组求交集(Intersection of multiple arrays)
- 2255.统计是给定字符串前缀的字符串数目(Count prefixes of a given string)
- 2259.移除指定数字得到的最大结果(Remove digit from number to maximize result)
- 2278.字母在字符串中的百分比(Percentage of Letter in String)
- 2351.第一个出现两次的字母(First Letter to Appear Twice)
- 2469.温度转换(Convert the Temperature)
- 2619.数组原型对象的最后一个元素(Array Prototype Last)
- 2733.既不是最小值也不是最大值(Neither Minimum nor Maximum)
- 2798.满足目标工作时长的员工数目(Number of Employees Who Met the Target)
- 3146.两个字符串的排列差(Permutation Difference between Two Strings)
- 3151.特殊数组 I(Special Array I)
- 3174.清除数字(Clear Digits)
- 5456.在区间范围内统计奇数数目 (Count Odd Numbers in an Interval Range)
- 5475.统计好三元组 (Count Good Triplets)
- 5657.唯一元素的和 (Sum of Unique Elements)
- 剑指 offer03.数组中重复的数字
- 剑指 offer04.二维数组中的查找
- 剑指 offer05.替换空格
- 剑指 offer06.从头到尾打印链表
- 剑指 offer09.用两个栈实现队列
- 剑指 offer11.旋转数组的最小数字
- 剑指 offer15.二进制中 1 的个数
- 剑指 offer17.打印从 1 到最大的 n 位数
- 剑指 offer18.删除链表的节点
- 剑指 offer21.调整数组顺序使奇数位于偶数前面
- 剑指 offer22.链表中倒数第 k 个节点
- 剑指 offer24.反转链表
- 剑指 offer25.合并两个排序的链表
- 剑指 Offer27.二叉树的镜像
- 剑指 offer30.包含 min 函数的栈
- 剑指 offer39.数组中出现次数超过一半的数字
- 剑指 offer40.最小的 k 个数
- 剑指 offer42.最近请求次数
- 剑指 offer50.第一个只出现一次的字符
- 剑指 offer53-I.在排序数组中查找数字 I
- 剑指 offer53-II.在 0~n-1 中缺失的数字
- 剑指 offer57.和为 s 的两个数字
- 剑指 offer58-I.翻转单词顺序
- 剑指 offer58-II.左旋转字符串
- 剑指 offer59-I.滑动窗口的最大值
- 剑指 offer62.圆圈中最后剩下的数字
- k-01.01.判定字符是否唯一
- k-01.02.判定是否互为字符重排
- k-01.03.URL 化
- k-01.06.字符串压缩
- k-02.01.移除重复节点
- k-02.02.返回倒数第 k 个节点
- k-02.03.删除中间节点
- k-03.01.三合一
- k-03.02.栈的最小值
- k-03.04.化栈为队
- k-05.07.配对交换
- k-08.03.魔术索引
- k-10.01.合并排序的数组
- k-10.05.稀疏数组搜索
- k-17.04.消失的数字
- k-17.10.主要元素
- LCP_01.猜数字
- LCP_06.拿硬币
- LCP_17.速算机器人
- 2.两数相加 (Add Two Numbers)
- 3.无重复字符的最长子串(Longest Substring Without Repeating Characters)
- 5.最长回文子串(Longest Palindromic Substring)
- 6.N字形变换(Zigzag Conversion)
- 11.盛水最多的容器(Container With Most Water)
- 12.整数转罗马数字(Integer to Roman)
- 15.三数之和 (3Sum)
- 16.最接近的三数之和(3Sum Closest)
- 17.电话号码的字母组合(Letter Combinations Of A Phone Number)
- 18.四数之和(4Sum)
- 19.删除链表的倒数第 N 个节点 (Remove Nth Node From End Of List)
- 22.括号生成(Generate Parentheses)
- 24.两两交换链表中的节点 (Swap Nodes in Pairs)
- 33.搜索旋转排序数组 (Search in Rotated Sorted Array)
- 34.在排序数组中查找元素的第一个和最后一个位置(Find First and Last Position of Element in Sorted Array)
- 36.有效的数独 (Valid Sudoku)
- 39.组合总和(Combination Sum)
- 43.字符串相乘(Multiply Strings)
- 45.跳跃游戏 II(Jump Game II)
- 46.全排列 (Permutations)
- 48.旋转图像(Rotate Image)
- 49.字母异位词分组 (Group Anagrams)
- 54.螺旋矩阵(Spiral Matrix)
- 55.跳跃游戏(Jump Game)
- 56.合并区间 (Merge Intervals)
- 57.插入区间(Insert Interval)
- 59.螺旋矩阵 II(Spiral Matrix II)
- 61.旋转链表 (Rotate List)
- 62.不同路径(Unique Paths)
- 63.不同路径II(Unique Paths II)
- 64.最小路径和(Minimum Path Sum)
- 71.简化路径(Simplify Path)
- 73.矩阵置零(Set Matrix Zeroes)
- 74.搜索二维矩阵(Search a 2D Matrix)
- 75.颜色分类 (Sort Colors)
- 77.组合(Combinations)
- 78.子集(Subsets)
- 80.删除有序数组中的重复项 II(Remove Duplicates from Sorted Array II)
- 82.删除排序链表中的重复元素 II (Remove Duplicates from Sorted List II)
- 86.分隔链表 (Partition List)
- 89.格雷编码(Gray Code)
- 90.子集 II(Subsets II)
- 93.复原 IP 地址(Restore IP Addresses)
- 94.二叉树的中序遍历 (Binary Tree Inorder Traversal)
- 97.交错字符串(Interleaving String)
- 102.二叉树的层序遍历(Binary Tree Level Order Traversal)
- 105.从前序与中序遍历序列构造二叉树(Construct Binary Tree from Preorder and Inorder Traversal)
- 106. 从中序与后序遍历序列构造二叉树(Construct Binary Tree from Inorder and Postorder Traversal)
- 128.最长连续序列(Longest Consecutive Sequence)
- 137.只出现一次的数字 II (Single Number II)
- 144.二叉树的前序遍历 (Binary Tree Preorder Traversal)
- 145.二叉树的后序遍历(Binary Tree Postorder Traversal)
- 146.LRU缓存机制 (LRU Cache)
- 151.翻转字符串里的单词 (Reverse Words in a String)
- 153.寻找旋转排序数组中的最小值(Find Minimum in Rotated Sorted Array)
- 162.寻找峰值(Find Peak Element)
- 165.比较版本号(Compare Version Numbers)
- 179.最大数(Largest Number)
- 187.重复的 DNA 序列 (Repeated DNA Sequences)
- 200.岛屿数量(Number of Islands)
- 207.课程表(Course Schedule)
- 209.长度最小的子数组(Minimum Size Subarray Sum)
- 215.数组中的第 K 个最大元素 (Kth Largest Element in an Array)
- 228.汇总区间 (Summary Ranges)
- 238.除自身以外数组的乘积(Product of Array Except Self)
- 260.只出现一次的数字 III (Single Number III)
- 274.H指数(H-Index)
- 284.顶端迭代器 (Peeking Iterator)
- 287.寻找重复数 (Find the Duplicate Number)
- 300.最长递增子序列(Longest Increasing Subsequence)
- 319.灯泡开关(Bulb Switcher)
- 341.扁平化嵌套列表迭代器(Flatten Nested List Iterator)
- 347.前 K 个高频元素 (Top K Frequent Elements)
- 355.设计推特(Design Twitter)
- 371.两整数之和(Sum of Two Integers)
- 380.常数时间插入、删除和获取随机元素 (Insert Delete GetRandom O(1))
- 384.打乱数组 (Shuffle an Array)
- 386.字典序排数(Lexicographical Numbers)
- 398.随机数索引(Random Pick Index)
- 413.等差数列划分(Arithmetic Slices)
- 438.找到字符串中所有字母异位词(Find All Anagrams in a String)
- 442.数组中重复的数据(Find All Duplicates in an Array)
- 443.压缩字符串(String Compression)
- 533.TinyURL 的加密与解密 (Encode and Decode TinyURL)
- 539.最小时间差(Minimum Time Difference)
- 553.最优解法 (Optimal Division)
- 622.设计循环队列 (Queue Circular)
- 628.三个数的最大乘积 (Maximum Product of Three Numbers)
- 676.实现一个魔法字典Implement Magic Dictionary
- 707.设计链表(Design Linked List)
- 739.每日温度 (Daily Temperatures)
- 807.保持城市天际线 (Max Increase to Keep City Skyline)
- 831.隐藏个人信息(Masking Personal Information)
- 912.排序数组 (Sort an Array)
- 986.区间列表的交集 (Interval List Intersections)
- 1282.用户分组 (Group the People Given the Group Size They Belong To)
- 1379.找出克隆二叉树中的相同节点 (Find a Corresponding Node of a Binary Tree in a Clone of That Tree)
- 1381.设计一个支持增量操作的栈(Design a Stack With Increment Operation)
- 1410.HTML 实体解析器 (HTML Entity Parser)
- 1418.点菜展示表(Display Table of Food Orders in a Restaurant)
- 1456.定长子串中元音的最大数目(Maximum Number of Vowels in a Substring of Given Length)
- 1472.设计浏览器历史记录(Design Browser History)
- 1476.子矩阵查询 (Subrectangle Queries)
- 1551.使数组中所有元素相等的最小操作数 (Minimum Operations to Make Array Equal)
- 1769.(Minimum Number of Operations to Move All Balls to Each Box)
- 1833.雪糕的最大数量(Maximum Ice Cream Bars)
- 1877.数组中最大数对和的最小值(Minimize Maximum Pair Sum in Array)
- 2149.按符号重排数组(Rearrange Array Elements by Sign)
- 2244.完成所有任务需要的最少轮数(Minimum Rounds to Complete All Tasks)
- 2256.(Minimum Average Difference)
- 2260.必须拿起的最小连续卡牌数(Minimum Consecutive Cards to Pick Up)
- 2414.最长的字母序连续子字符串的长度(Length of the Longest Alphabetical Continuous Substring)
- 5476.找出数组游戏的赢家 (Find the Winner of an Array Game)
- 剑指 offer64.求 1+2+...+n
- k-16.01.交换数字