{"id":16675794,"url":"https://github.com/imajinyun/leetcode-php","last_synced_at":"2026-03-08T05:33:10.202Z","repository":{"id":47483894,"uuid":"363634864","full_name":"imajinyun/leetcode-php","owner":"imajinyun","description":"🚀 🐘 🌈 LeetCode with PHP 🔥","archived":false,"fork":false,"pushed_at":"2022-03-29T06:14:06.000Z","size":925,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T10:58:33.019Z","etag":null,"topics":["leetcode","leetcode-php","leetcode-solutions","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imajinyun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-02T11:31:08.000Z","updated_at":"2024-12-20T15:19:58.000Z","dependencies_parsed_at":"2022-08-20T00:41:26.793Z","dependency_job_id":null,"html_url":"https://github.com/imajinyun/leetcode-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imajinyun/leetcode-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imajinyun%2Fleetcode-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imajinyun%2Fleetcode-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imajinyun%2Fleetcode-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imajinyun%2Fleetcode-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imajinyun","download_url":"https://codeload.github.com/imajinyun/leetcode-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imajinyun%2Fleetcode-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leetcode","leetcode-php","leetcode-solutions","php"],"created_at":"2024-10-12T13:07:47.552Z","updated_at":"2026-03-08T05:33:05.182Z","avatar_url":"https://github.com/imajinyun.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 🐘 🌈 LeetCode with PHP 🔥\n\n[![Build Status](https://travis-ci.com/imajinyun/leetcode-php.svg?branch=master)](https://travis-ci.com/imajinyun/leetcode-php)\n[![Build status](https://ci.appveyor.com/api/projects/status/63m04iayror6ieh2?svg=true)](https://ci.appveyor.com/project/imajinyun/leetcode-php)\n[![Build](https://github.com/imajinyun/leetcode-php/actions/workflows/build.yml/badge.svg)](https://github.com/imajinyun/leetcode-php/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/imajinyun/leetcode-php/branch/master/graph/badge.svg?token=Y9H1AHWLFY)](https://codecov.io/gh/imajinyun/leetcode-php)\n[![StyleCI](https://github.styleci.io/repos/363634864/shield?branch=master)](https://github.styleci.io/repos/363634864?branch=master)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=leetcode-php\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=leetcode-php)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/imajinyun/leetcode-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/imajinyun/leetcode-php/?branch=master)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php?ref=badge_shield)\n[![Version](https://img.shields.io/static/v1?label=version\u0026message=%3E%3D8.0\u0026color=%234F5893\u0026labelColor=grey\u0026logo=PHP\u0026logoColor=blue\u0026style=flat\u0026link=https%3A%2F%2Fwww.php.net%2Fsupported-versions.php)](https://www.php.net/supported-versions.php)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php?ref=badge_shield)\n\n## Requirements\n\n* PHP \u003e= 8.0\n* PHPUnit \u003e= 9.5\n\n## Usage\n\nInstall the package through [Composer](https://getcomposer.org/).\n\nRun the Composer require command from the Terminal:\n\n```bash\n$ git clone git@github.com:imajinyun/leetcode-php.git\n$ cd leetcode-php \u0026\u0026 composer install \n$ phpunit -vvv\n```\n\n## Contents\n\n### LeetCode\n\n\u003cdetails\u003e\n\u003csummary\u003eArray\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0001. 两数之和`|[Two Sum](https://leetcode.com/problems/two-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/TwoSum.php)|\n|`0118. 杨辉三角`|[Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PascalsTriangle.php)|\n|`0026. 删除有序数组中的重复项`|[Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RemoveDuplicatesFromSortedArray.php)|\n|`0027. 移除元素`|[Remove Element](https://leetcode.com/problems/remove-element/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RemoveElement.php)|\n|`0053. 最大子序和`|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MaximumSubarray.php)|\n|`0054. 螺旋矩阵`|[Spiral Matrix](https://leetcode.com/problems/spiral-matrix/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SpiralMatrix.php)|\n|`0059. 螺旋矩阵 II`|[Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SpiralMatrixII.php)|\n|`0066. 加一`|[Plus One](https://leetcode.com/problems/plus-one/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PlusOne.php)|\n|`0088. 合并两个有序数组`|[Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MergeSortedArray.php)|\n|`0118. 杨辉三角`|[Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PascalsTriangle.php)|\n|`0119. 杨辉三角 II`|[Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PascalsTriangleII.php)|\n|`0163. 缺失的区间`|[Missing Ranges](https://leetcode.com/problems/missing-ranges/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MissingRanges.php)|\n|`0167. 两数之和 II - 输入有序数组`|[Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)||\n|`0169. 多数元素`|[Majority Element](https://leetcode.com/problems/majority-element/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MajorityElement.php)|\n|`0189. 旋转数组`|[Rotate Array](https://leetcode.com/problems/rotate-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RotateArray.php)|\n|`0215. 数组中的第 K 个最大元素`|[Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/KthLargestElementInAnArray.php)|\n|`0217. 存在重复元素`|[Contains Duplicate](https://leetcode.com/problems/contains-duplicate/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ContainsDuplicate.php)|\n|`0219. 存在重复元素 II`|[Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ContainsDuplicateII.php)|\n|`0228. 汇总区间`|[Summary Ranges](https://leetcode.com/problems/summary-ranges/)||\n|`0238. `|[Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ProductOfArrayExceptSelf.php)|\n|`0243. 最短单词距离`|[Shortest Word Distance](https://leetcode.com/problems/shortest-word-distance/)||\n|`0268. 丢失的数字`|[Missing Number](https://leetcode.com/problems/missing-number/)||\n|`0283. 移动零`|[Move Zeroes](https://leetcode.com/problems/move-zeroes/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MoveZeroes.php)|\n|`0350. 两个数组的交集 II`|[Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/IntersectionOfTwoArraysII.php)|\n|`0384. 打乱数组`|[Shuffle an Array](https://leetcode.com/problems/shuffle-an-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ShuffleAnArray.php)|\n|`0414. 第三大的数`|[Third Maximum Number](https://leetcode.com/problems/third-maximum-number/)||\n|`0448. 找到所有数组中消失的数字`|[Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)||\n|`0485. 最大连续 1 的个数`|[Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MaxConsecutiveOnes.php)|\n|`0509. 斐波那契数`|[Fibonacci Number](https://leetcode.com/problems/fibonacci-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FibonacciNumber.php)|\n|`0561. 数组拆分 I`|[Array Partition I](https://leetcode.com/problems/array-partition-i/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ArrayPartitionI.php)|\n|`0566. 重塑矩阵`|[Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReshapeTheMatrix.php)|\n|`0605. 种花问题`|[Can Place Flowers](https://leetcode.com/problems/can-place-flowers/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CanPlaceFlowers.php)|\n|`0628. 三个数的最大乘积`|[Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/)||\n|`0643. 子数组最大平均数 I`|[Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/)||\n|`0661. 图片平滑器`|[Image Smoother](https://leetcode.com/problems/image-smoother/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ImageSmoother.php)|\n|`0674. 最长连续递增序列`|[Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestContinuousIncreasingSubsequence.php)|\n|`0697. 数组的度`|[Degree of an Array](https://leetcode.com/problems/degree-of-an-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DegreeOfAnArray.php)|\n|`0717. 1 比特与 2 比特字符`|[1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/OneBitAndTwoBitCharacters.php)|\n|`0724. 寻找数组的中心下标`|[Find Pivot Index](https://leetcode.com/problems/find-pivot-index/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindPivotIndex.php)|\n|`0746. 使用最小花费爬楼梯`|[Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinCostClimbingStairs.php)|\n|`0747. 至少是其他数字两倍的最大数`|[Largest Number At Least Twice of Others](https://leetcode.com/problems/largest-number-at-least-twice-of-others/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LargestNumberAtLeastTwiceOfOthers.php)|\n|`0766. 托普利茨矩阵`|[Toeplitz Matrix](https://leetcode.com/problems/toeplitz-matrix/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ToeplitzMatrix.php)|\n|`0830. 较大分组的位置`|[Positions of Large Groups](https://leetcode.com/problems/positions-of-large-groups/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PositionsOfLargeGroups.php)|\n|`0832. 翻转图像`|[Flipping an Image](https://leetcode.com/problems/flipping-an-image/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FlippingAnImage.php)|\n|`0867. 转置矩阵`|[Transpose Matrix](https://leetcode-cn.com/problems/transpose-matrix/)|[Solution]()|\n|`0888. 公平的糖果棒交换`|[Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FairCandySwap.php)|\n|`0896. 单调数列`|[Monotonic Array](https://leetcode.com/problems/monotonic-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MonotonicArray.php)|\n|`0905. 按奇偶排序数组`|[Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SortArrayByParity.php)|\n|`0914. 卡牌分组`|[X of a Kind in a Deck of Cards](https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/XOfAKindInADeckOfCards.php)|\n|`0922. 按奇偶排序数组 II`|[Sort Array By Parity II](https://leetcode.com/problems/sort-array-by-parity-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SortArrayByParityII.php)|\n|`0941. 有效的山脉数组`|[Valid Mountain Array](https://leetcode.com/problems/valid-mountain-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidMountainArray.php)|\n|`0977. 有序数组的平方`|[Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SquaresOfASortedArray.php)|\n|`0985. 查询后的偶数和`|[Sum of Even Numbers After Queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SumOfEvenNumbersAfterQueries.php)|\n|`0989. 数组形式的整数加法`|[Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/AddToArrayFormOfInteger.php)|\n|`0999. 可以被一步捕获的棋子数`|[Available Captures for Rook](https://leetcode.com/problems/available-captures-for-rook/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/AvailableCapturesForRook.php)|\n|`1002. 查找常用字符`|[Find Common Characters](https://leetcode.com/problems/find-common-characters/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindCommonCharacters.php)|\n|`1013. 将数组分成和相等的三个部分`|[Partition Array Into Three Parts With Equal Sum](https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PartitionArrayIntoThreePartsWithEqualSum.php)|\n|`1018. 可被 5 整除的二进制前缀`|[Binary Prefix Divisible By 5](https://leetcode.com/problems/binary-prefix-divisible-by-5/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HeightChecker.php)|\n|`1051. 高度检查器`|[Height Checker](https://leetcode.com/problems/height-checker/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HeightChecker.php)|\n|`1064. 不动点`|[Fixed Point](https://leetcode.com/problems/fixed-point/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FixedPoint.php)|\n|`1085. 最小元素各数位之和`|[Sum of Digits in the Minimum Number](https://leetcode.com/problems/sum-of-digits-in-the-minimum-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SumOfDigitsInTheMinimumNumber.php)|\n|`1086. 前五科的均分`|[High Five](https://leetcode.com/problems/high-five/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HighFive.php)|\n|`1089. 复写零`|[Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DuplicateZeros.php)|\n|`1099 小于 K 的两数之和`|[Two Sum Less Than K](https://leetcode.com/problems/two-sum-less-than-k/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/TwoSumLessThanK.php)|\n|`1122. 数组的相对排序`|[Relative Sort Array](https://leetcode.com/problems/relative-sort-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RelativeSortArray.php)|\n|`1128. 等价多米诺骨牌对的数量`|[Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NumberOfEquivalentDominoPairs.php)|\n|`1150. 检查一个数是否在数组中占绝大多数`|[Check If a Number Is Majority Element in a Sorted Array](https://leetcode.com/problems/check-if-a-number-is-majority-element-in-a-sorted-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CheckIfANumberIsMajorityElementInASortedArrayEasy.php)|\n|`1160. 拼写单词`|[Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindWordsThatCanBeFormedByCharacters.php)|\n|`1176. 健身计划评估`|[Diet Plan Performance Easy](https://leetcode.com/problems/diet-plan-performance/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DietPlanPerformanceEasy.php)|\n|`1184. 公交站间的距离`|[Distance Between Bus Stops](https://leetcode.com/problems/distance-between-bus-stops/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DistanceBetweenBusStops.php)|\n|`1185. 一周中的第几天`|[Day of the Week](https://leetcode.com/problems/day-of-the-week/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DayOfTheWeek.php)|\n|`1200. 最小绝对差`|[Minimum Absolute Difference](https://leetcode.com/problems/minimum-absolute-difference/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumAbsoluteDifference.php)|\n|`1217. 玩筹码`|[Minimum Cost to Move Chips to The Same Position](https://leetcode.com/problems/minimum-cost-to-move-chips-to-the-same-position/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumCostToMoveChipsToTheSamePosition.php)|\n|`1232. 缀点成线`|[Check If It Is a Straight Line](https://leetcode.com/problems/check-if-it-is-a-straight-line/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CheckIfItIsAStraightLine.php)|\n|`1243. 数组变换`|[Array Transformation](https://leetcode.com/problems/array-transformation/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ArrayTransformation.php)|\n|`1252. 奇数值单元格的数目`|[Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CellsWithOddValueInAMatrix.php)|\n|`1260. 二维网格迁移`|[Shift 2D Grid](https://leetcode.com/problems/shift-2d-grid/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/Shift2DGrid.php)|\n|`1266. 访问所有点的最小时间`|[Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumTimeVisitingAllPoints.php)|\n|`1275. `|[Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindWinnerOnATicTacToeGame.php)|\n|`1295. 统计位数为偶数的数字`|[Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindNumbersWithEvenNumberOfDigits.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHashTable\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0001. 两数之和`|[Two Sum](https://leetcode.com/problems/two-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/TwoSum.php)|\n|`0012. 整数转罗马数字`|[Integer to Roman](https://leetcode.com/problems/integer-to-roman/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/IntegerToRoman.php)|\n|`0013. 罗马数字转整数`|[Roman to Integer](https://leetcode.com/problems/roman-to-integer/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RomanToInteger.php)|\n|`0136. 只出现一次的数字`|[Single Number](https://leetcode.com/problems/single-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindWinnerOnATicTacToeGame.php)|\n|`0202. 快乐数`|[Happy Number](https://leetcode.com/problems/happy-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HappyNumber.php)|\n|`0242. 有效的字母异位词`|[Valid Anagram](https://leetcode.com/problems/valid-anagram/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidAnagram.php)|\n|`0349. 两个数组的交集`|[Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/IntersectionOfTwoArrays.php)|\n|`0387. 字符串中的第一个唯一字符`|[First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FirstUniqueCharacterInAString.php)|\n|`0454. 四数相加 II`|[4Sum II](https://leetcode.com/problems/4sum-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FourSumII.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLinked List\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0002. 两数相加`|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/AddTwoNumbers.php)|\n|`0021. 合并两个有序链表`|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MergeTwoSortedLists.php)|\n|`0024. 两两交换链表中的节点`|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SwapNodesInPairs.php)|\n|`0092. 反转链表 II`|[Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReverseLinkedListII.php)|\n|`0203. 移除链表元素`|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RemoveLinkedListElements.php)|\n|`0206. 反转链表`|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReverseLinkedList.php)|\n|`0141. 环形链表`|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LinkedListCycle.php)|\n|`0234. 回文链表`|[Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PalindromeLinkedList.php)|\n|`0237. 删除链表中的节点`|[Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DeleteNodeInALinkedList.php)|\n|`0707. 设计链表`|[Design Linked List](https://leetcode.com/problems/design-linked-list/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DesignLinkedList.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMath\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0013. 罗马数字转整数`|[Roman to Integer](https://leetcode.com/problems/roman-to-integer/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RomanToInteger)|\n|`0050. 计算 x 的 n 次幂`|[Pow(x, n)](https://leetcode.com/problems/powx-n/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/Pow.php)|\n|`0066. 加一`|[Plus One](https://leetcode.com/problems/plus-one/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PlusOne.php)|\n|`0069. X 的平方根`|[Sqrt(x)](https://leetcode.com/problems/sqrtx/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SqrtX.php)|\n|`0150. 逆波兰表达式求值`|[Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/EvaluateReversePolishNotation.php)|\n|`0171. Excel 表列序号`|[Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ExcelSheetColumnNumber.php)|\n|`0227. 基本计算器 II`|[Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BasicCalculatorII.php)|\n|`1118. 一月有多少天`|[Number of Days in a Month](https://leetcode.com/problems/number-of-days-in-a-month/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NumberOfDaysInAMonth.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTwo Pointers\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0015. 三数之和`|[3Sum](https://leetcode.com/problems/3sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ThreeSum.php)|\n|`0016. 最接近的三数之和`|[3Sum Closest](https://leetcode.com/problems/3sum-closest/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ThreeSumClosest.php)|\n|`0018. 四数之和`|[4Sum](https://leetcode.com/problems/4sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FourSum.php)|\n|`0019. 删除链表的倒数第 N 个节点`|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/RemoveNthNodeFromEndOfList.php)|\n|`0142. 环形链表 II`|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LinkedListCycleII.php)|\n|`0209. 长度最小的子数组`|[Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumSizeSubarraySum.php)|\n|`0287. 寻找重复数`|[Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FourSum.php)|\n|`0844. 比较含退格的字符串`|[Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BackspaceStringCompare.php)|\n|`0997. 有序数组的平方`|[Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SquaresOfASortedArray.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eString\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0003. 无重复字符的最长子串`|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestSubstringWithoutRepeatingCharacters.php)|\n|`0005. 最长回文子串`|[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestPalindromicSubstring.php)|\n|`0006. Z 字形变换`|[Zigzag Conversion](https://leetcode.com/problems/longest-palindromic-substring/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ZigzagConversion.php)|\n|`0008. 字符串转换整数 (atoi)`|[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/StringToInteger.php)|\n|`0125. 验证回文串`|[Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidPalindrome.php)|\n|`0179. 最大数`|[Largest Number](https://leetcode.com/problems/largest-number/)|[Soluton](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LargestNumber.php)|\n|`0344. 反转字符串`|[Reverse String](https://leetcode.com/problems/reverse-string/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReverseString.php)|\n|`0409. 最长回文串`|[Longest Palindrome](https://leetcode.com/problems/longest-palindrome/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestPalindrome.php)|\n|`0541. 反转字符串 II`|[Reverse String II](https://leetcode.com/problems/reverse-string-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReverseStringII.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBinary Search\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0035. 搜索插入位置`|[Search Insert Position](https://leetcode.com/problems/search-insert-position/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SearchInsertPosition.php)|\n|`0069. x 的平方根`|[Sqrt(x)](https://leetcode.com/problems/sqrtx/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SqrtX.php)|\n|`0162. 寻找峰值`|[Find Peak Element](https://leetcode.com/problems/find-peak-element/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindPeakElement.php)|\n|`0367. 有效的完全平方数`|[Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidPerfectSquare.php)|\n|`0704. 二分查找`|[Binary Search](https://leetcode.com/problems/binary-search/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinarySearch.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDivide and Conquer\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0169. 多数元素`|[Majority Element](https://leetcode.com/problems/majority-element/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MajorityElement)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDynamic Programming\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0005. 最长回文子串`|[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestPalindromicSubstring.php)|\n|`0062. 不同路径`|[Unique Paths](https://leetcode.com/problems/unique-paths/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/UniquePaths.php)|\n|`0063. 不同路径 II`|[Unique Paths II](https://leetcode.com/problems/unique-paths-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/UniquePathsII.php)|\n|`0064. 最小路径和`|[Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumPathSum.php)|\n|`0070. 爬楼梯`|[Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ClimbingStairs.php)|\n|`0072. 编辑距离`|[Edit Distance](https://leetcode.com/problems/edit-distance/)||\n|`0120. 三角形最小路径和`|[Triangle](https://leetcode.com/problems/triangle/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/Triangle.php)|\n|`0121. 买卖股票的最佳时机`|[Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStock.php)|\n|`0122. 买卖股票的最佳时机 II`|[Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStockII.php)|\n|`0123. 买卖股票的最佳时机 III`|[Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStockIII.php)|\n|`0128. 最长连续序列`|[Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/)||\n|`0152. 乘积最大子数组`|[Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MaximumProductSubarray.php)|\n|`0188. 买卖股票的最佳时机 IV`|[Best Time to Buy and Sell Stock IV](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStockIV.php)|\n|`0213. 打家劫舍 II`|[House Robber II](https://leetcode.com/problems/house-robber-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HouseRobberII.php)|\n|`0300. 最长上升子序列`|[Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/)||\n|`0322. 零钱兑换`|[Coin Change](https://leetcode.com/problems/coin-change/)||\n|`0309. 佳买卖股票时机含冷冻期`|[Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStockWithCooldown.php)|\n|`0673. 最长递增子序列的个数`|[Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/)||\n|`0674. 最长连续递增序列`|[Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/)||\n|`0714. 买卖股票的最佳时机含手续费`|[Best Time to Buy and Sell Stock with Transaction Fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BestTimeToBuyAndSellStockWithTransactionFee.php)|\n|`1143. 最长公共子序列`|[Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/)||\n|`1289. 下降路径最小和 II`|[Minimum Falling Path Sum II](https://leetcode.com/problems/minimum-falling-path-sum-ii/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumFallingPathSumII.php)|\n|`1397. 找到所有好字符串`|[Find All Good Strings](https://leetcode.com/problems/find-all-good-strings/)||\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBacktracking\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0036. 有效的数独`|[Valid Sudoku](https://leetcode.com/problems/valid-sudoku/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidSudoku.php)|\n|`0037. 解数独`|[Sudoku Solver](https://leetcode.com/problems/sudoku-solver/)||\n|`0039. 组合总和`|[Combination Sum](https://leetcode.com/problems/combination-sum/)||\n|`0040. 组合总和 II`|[Combination Sum II](https://leetcode.com/problems/combination-sum-ii/)||\n|`0046. 全排列`|[Permutations](https://leetcode.com/problems/permutations/)||\n|`0047. 全排列 II`|[Permutations II](https://leetcode.com/problems/permutations-ii/)||\n|`0051. N 皇后`|[N-Queens](https://leetcode.com/problems/n-queens/)||\n|`0052. N 皇后 II`|[N-Queens II](https://leetcode.com/problems/n-queens-ii/)||\n|`0078. 子集`|[Subsets](https://leetcode.com/problems/subsets/)||\n|`0079. 单词搜索`|[Word Search](https://leetcode.com/problems/word-search/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/WordSearch.php)|\n|`0090. 子集 II`|[Subsets II](https://leetcode.com/problems/subsets-ii/)||\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eStack\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0020. 有效的括号`|[Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeInorderTraversal.php)|\n|`0094. 二叉树的中序遍历`|[Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeInorderTraversal.php)|\n|`0496. 下一个更大元素 I`|[Next Greater Element I](https://leetcode.com/problems/next-greatr-element-i/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NextGreaterElementI.php)|\n|`0503. 下一个更大元素 II`|[Next Greater Element II](https://leetcode.com/problems/next-greater-element-i/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NextGreaterElementII.php)|\n|`0739. 每日温度`|[Daily Temperatures](https://leetcode.com/problems/daily-temperatures/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DailyTemperatures.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGreedy\u003c/summary\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSort\u003c/summary\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBit Manipulation\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0029. 两数相除`|[Divide Two Integers](https://leetcode.com/problems/divide-two-integers/)|[Solution](ttps://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DivideTwoIntegers.php)|\n|`0190. 颠倒二进制位`|[Reverse Bits](https://leetcode.com/problems/reverse-bits/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ReverseBits.php)|\n|`0191. 位 1 的个数`|[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NumberOfOneBits.php)|\n|`0231. 2 的幂`|[Power of Two](https://leetcode.com/problems/power-of-two/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PowerOfTwo.php)|\n|`0338. 比特位计数`|[Counting Bits](https://leetcode.com/problems/counting-bits/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CountingBits.php)|\n|`0461. 汉明距离`|[Hamming Distance](https://leetcode.com/problems/hamming-distance/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/HammingDistance.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0020. 括号生成`|[Generate Parentheses](https://leetcode.com/problems/generate-parentheses/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/GenerateParentheses.php)|\n|`0098. 验证二叉搜索树`|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ValidateBinarySearchTree.php)|\n|`0100. 相同的树`|[Same Tree](https://leetcode.com/problems/same-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/Pow.php)|\n|`0102. 二叉树的层序遍历`|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeLevelOrderTraversal.php)|\n|`0103. 二叉树的锯齿形层次遍历`|[Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeZigzagLevelOrderTraversal.php)|\n|`0104. 二叉树的最大深度`|[Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MaximumDepthOfBinaryTree.php)|\n|`0199. 二叉树的右视图`|[Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeRightSideView.php)|\n|`0230. 二叉搜索树中第 K 小的元素`|[Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/KthSmallestElementInABST.php)|\n|`0235. 二叉搜索树的最近公共祖先`|[Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LowestCommonAncestorOfABinarySearchTree.php)|\n|`0236. 二叉树的最近公共祖先`|[Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LowestCommonAncestorOfABinaryTree.php)|\n|`0450. 删除二叉搜索树中的节点`|[Delete Node in a Binary Search Tree](https://leetcode.com/problems/delete-node-in-a-bst/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/DeleteNodeInABinarySearchTree.php)|\n|`0515. 在每个树行中找最大值`|[Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindLargestValueInEachTreeRow.php)|\n|`0637. 二叉树的层平均值`|[Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/AverageOfLevelsInBinaryTree.php)|\n|`0700. 二叉搜索树中的搜索`|[Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SearchInABinarySearchTree.php)|\n|`0701. 二叉搜索树中的插入操作`|[Insert into a Binary Search Tree](https://leetcode.com/problems/insert-into-a-binary-search-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/InsertIntoABinarySearchTree.php)|\n|`0993. 二叉树的堂兄弟节点`|[Cousins in Binary Tree](https://leetcode.com/problems/cousins-in-binary-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/CousinsInBinaryTree.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDepth-First Search\u003c/summary\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBreadth-First Search\u003c/summary\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUnion Find\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0200. 岛屿数量`|[Number of Islands](https://leetcode.com/problems/number-of-islands/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/NumberOfIslands.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGraph\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDesign\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0208. 实现 Trie（前缀树）`|[Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ImplementTriePrefixTree.php)|\n|`0225. 用队列实现栈`|[Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ImplementStackUsingQueues.php)|\n|`0232. 用栈实现队列`|[Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/ImplementQueueUsingStacks.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTopological Sort\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTrie\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBinary Indexed Tree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSegment Tree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBinary Search Tree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0278. 第一个错误的版本`|[First Bad Version](https://leetcode.com/problems/first-bad-version/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FirstBadVersion.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRecursion\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0509. 斐波那契数`|[Fibonacci Number](https://leetcode.com/problems/fibonacci-number/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FibonacciNumber.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBrainteaser\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMemoization\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eQueue\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0239. 滑动窗口最大值`|[Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SlidingWindowMaximum.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eReservoir Sampling\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eOrdered Map\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGeometry\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRejection Sampling\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSliding Window\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0003. 无重复字符的最长子串`|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/LongestSubstringWithoutRepeatingCharacters.php)|\n|`0076. 最小覆盖子串`|[Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/MinimumWindowSubstring.php)|\n|`0438. 找到字符串中所有字母异位词`|[Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindAllAnagramsInAString.php)|\n|`0567. 字符串的排列`|[Permutation in String](https://leetcode.com/problems/permutation-in-string/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/PermutationInString.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLine Sweep\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRolling Hash\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSuffix Array\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDatabase\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eShell\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eConcurrency\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSorting\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHeap (Priority Queue)\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0295. 数据流的中位数`|[Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/FindMedianFromDataStream.php)|\n|`0347. 前 K 个高频元素`|[Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/TopKFrequentElements.php)|\n|`0378. 有序矩阵中第 K 小的元素`|[Kth Smallest Element in a Sorted Matrix](https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/KthSmallestElementInASortedMatrix.php)|\n|`0703. 数据流中的第 K 大元素`|[Kth Largest Element in a Stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/KthLargestElementInAStream.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMerge Sort\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eString Matching\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMatrix\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMonotonic Stack\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSimulation\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCombinatorics\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBinary Tree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n|`0101. 对称二叉树`|[Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/SymmetricTree.php)|\n|`0124. 二叉树最大路径和`|[Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/BinaryTreeMaximumPathSum.php)|\n|`0226. 翻转二叉树`|[Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)|[Solution](https://github.com/imajinyun/leetcode-php/blob/master/src/leetcode/InvertBinaryTree.php)|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDoubly-Linked List\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eInteractive\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBucket Sort\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRadix Sort\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCounting\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eData Stream\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eIterator\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHash Function\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eEnumeration\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNumber Theory\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePrefix Sum\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eQuickselect\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eOrdered Set\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMonotonic Queue\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCounting Sort\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGame Theory\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eEulerian Circuit\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRandomized\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eShortest Path\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBitmask\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eProbability and Statistics\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMinimum Spanning Tree\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBiconnected Component\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eStrongly Connected Component\u003c/summary\u003e\n\n|Subject|Source|Solution|\n|---|---|---|\n\n\u003c/details\u003e\n\n### 剑指 Offer\n\n* [032. 从上到下打印二叉树](https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-lcof/)\n* [032. 从上到下打印二叉树 II](https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-ii-lcof/)\n* [032. 从上到下打印二叉树 III](https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-iii-lcof/)\n* [061. 扑克牌中的顺子](https://leetcode-cn.com/problems/bu-ke-pai-zhong-de-shun-zi-lcof/)\n\n### 程序员面试金典\n\n* [0403. 特定深度节点链表](https://leetcode-cn.com/problems/list-of-depth-lcci/)\n\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimajinyun%2Fleetcode-php?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimajinyun%2Fleetcode-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimajinyun%2Fleetcode-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimajinyun%2Fleetcode-php/lists"}