Skip to content

g10guang/LeetCode

Repository files navigation

本仓库记录 LeetCode 部分题目的解,其中使用的编程语言为 Go

其中题库跟随仓库:https://github.com/CyC2018/Interview-Notebook/blob/master/notes/Leetcode%20%E9%A2%98%E8%A7%A3.md

更加全面题解:https://github.com/haoel/leetcode

目录

二分查找

求开方

69. Sqrt(x)

Solution

抛硬币

441. Arranging Coins

Soluton

有序数组中的 Single Element

540. Single Element in a Sorted Array

Soluton

贪心算法

饼干分配

455. Assign Cookies

Solution

投飞镖刺破气球

452. Minimum Number of Arrows to Burst Balloons

Solution

股票收益最大

122. Best Time to Buy and Sell Stock II

Solution

种植花朵

605. Can Place Flowers

Solution

修改数组为非递减

665. Non-decreasing Array

Solution

子串问题

392. Is Subsequence

Solution

分割字符串

763. Partition Labels

Solution

根据身高排队

406. Queue Reconstruction by Height

Solution

双指针

有序数组中寻找两个数字等于特定数字

167. Two Sum II - Input array is sorted

Solution

旋转元音字母

345. Reverse Vowels of a String

Solution

寻找两数平方和等于第三个数

633. Sum of Square Numbers

Solution

字符串回文

680. Valid Palindrome II

Solution

归并排序数组

88. Merge Sorted Array

Solution

链表是否有环

141. Linked List Cycle

Solution

字符串最长单词

524. Longest Word in Dictionary through Deleting

Solution

排序

第 K 个元素

215. Kth Largest Element in an Array

Solution

Top-K Frequency elements

347. Top K Frequent Elements

Solution

根据字母频率排序

451. Sort Characters By Frequency

Solution

图的遍历

岛屿的最大面积

695. Max Area of Island

Solution

朋友圈

547. Friend Circles

Solution

岛屿数量

200. Number of Islands

Solution

二叉树叶子到根的路径

257. Binary Tree Paths

Solution

划分 IP 地址

93. Restore IP Addresses

Solution

封闭区域

130. Surrounded Regions

Solution

可达性分析

417. Pacific Atlantic Water Flow

Solution

回溯

数字组合

17. Letter Combinations of a Phone Number

Solution

单词搜索

79. Word Search

Solution

排列组合

46. Permutations

Solution

有重复元素下的排列组合

47. Permutations II

Solution

数字组合

77. Combinations

Solution

找出集和中和等于特殊值的子集和

39. Combination Sum

Solution

含有相同元素的集和,找和为特殊值的子集和

40. Combination Sum II

Solution

集和中寻找和为特殊值的子集和

216. Combination Sum III

Solution

两个有序数组的中位数

[4. 寻找两个有序数组的中位数]https://leetcode-cn.com/problems/median-of-two-sorted-arrays/submissions/()

Solution

About

Mark down solution for problems what I practice on https://leetcode.com/.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published