个人LeetCode练习的题解,Kotlin
编程实现。
- 1. 两数之和
- 2. 两数相加
- 3. 无重复字符的最长子串
- 4. 寻找两个正序数组的中位数
- 5. 最长回文子串
- 6. Z 字形变换
- 7. 整数反转
- 8. 字符串转换整数 (atoi)
- 9. 回文数
- 11. 盛最多水的容器
- 14. 最长公共前缀
- 15. 三数之和
- 17. 电话号码的字母组合
- 19. 删除链表的倒数第 N 个结点
- 20. 有效的括号
- 21. 合并两个有序链表
- 22. 括号生成
- 23. 合并K个升序链表
- 32. 最长有效括号
- 33. 搜索旋转排序数组
- 34. 在排序数组中查找元素的第一个和最后一个位置
- 35. 搜索插入位置
- 39. 组合总和
- 40. 组合总和 II
- 45. 跳跃游戏 II
- 46. 全排列
- 47. 全排列 II
- 55. 跳跃游戏
- 62. 不同路径
- 70. 爬楼梯
- 72. 编辑距离
- 74. 搜索二维矩阵
- 77. 组合
- 78. 子集
- 79. 单词搜索
- 82. 删除排序链表中的重复元素 II
- 90. 子集 II
- 91. 解码方法
- 116. 填充每个节点的下一个右侧节点指针
- 117. 填充每个节点的下一个右侧节点指针 II
- 120. 三角形最小路径和
- 130. 被围绕的区域
- 136. 只出现一次的数字
- 139. 单词拆分
- 149. 直线上最多的点数
- 153. 寻找旋转排序数组中的最小值
- 162. 寻找峰值
- 167. 两数之和 II - 输入有序数组
- 172. 阶乘后的零
- 175. 组合两个表
- 176. 第二高的薪水
- 182. 查找重复的电子邮箱
- 183. 从不订购的客户
- 189. 轮转数组
- 190. 颠倒二进制位
- 191. 位1的个数
- 196. 删除重复的电子邮箱
- 197. 上升的温度
- 198. 打家劫舍
- 200. 岛屿数量
- 201. 数字范围按位与
- 202. 快乐数
- 206. 反转链表
- 209. 长度最小的子数组
- 213. 打家劫舍 II
- 231. 2 的幂
- 258. 各位相加
- 278. 第一个错误的版本
- 283. 移动零
- 300. 最长递增子序列
- 310. 最小高度树
- 322. 零钱兑换
- 343. 整数拆分
- 344. 反转字符串
- 357. 统计各位数字都不同的数字个数
- 307. 区域和检索 - 数组可修改
- 380. O(1) 时间插入、删除和获取随机元素
- 384. 打乱数组
- 385. 迷你语法分析器
- 386. 字典序排数
- 388. 文件的最长绝对路径
- 393. UTF-8 编码验证
- 413. 等差数列划分
- 420. 强密码检验器
- 429. N 叉树的层序遍历
- 432. 全 O(1) 的数据结构
- 438. 找到字符串中所有字母异位词
- 440. 字典序的第K小数字
- 479. 最大回文数乘积
- 504. 七进制数
- 511. 游戏玩法分析 I
- 521. 最长特殊序列 Ⅰ
- 542. 01 矩阵
- 547. 省份数量
- 557. 反转字符串中的单词 III
- 564. 寻找最近的回文数
- 567. 字符串的排列
- 572. 另一棵树的子树
- 583. 两个字符串的删除操作
- 584. 寻找用户推荐人
- 586. 订单最多的客户
- 589. N 叉树的前序遍历
- 590. N 叉树的后序遍历
- 595. 大的国家
- 599. 两个列表的最小索引总和
- 606. 根据二叉树创建字符串
- 607. 销售员
- 608. 树节点
- 617. 合并二叉树
- 627. 变更性别
- 653. 两数之和 IV - 输入 BST
- 661. 图片平滑器
- 673. 最长递增子序列的个数
- 682. 棒球比赛
- 693. 交替位二进制数
- 695. 岛屿的最大面积
- 704. 二分查找
- 713. 乘积小于K的子数组
- 720. 词典中最长的单词
- 728. 自除数
- 733. 图像渲染
- 744. 寻找比目标字母大的最小字母
- 762. 二进制表示中质数个计算置位
- 780. 到达终点
- 784. 字母大小写全排列
- 796. 旋转字符串
- 797. 所有可能的路径
- 798. 得分最高的最小轮调
- 804. 唯一摩尔斯密码词
- 806. 写字符串需要的行数
- 819. 最常见的单词
- 821. 字符的最短距离
- 824. 山羊拉丁文
- 844. 比较含退格的字符串
- 876. 链表的中间结点
- 954. 二倍数对数组
- 977. 有序数组的平方
- 986. 区间列表的交集
- 994. 腐烂的橘子
- 1050. 合作过至少三次的演员和导演
- 1084. 销售分析III
- 1091. 二进制矩阵中的最短路径
- 1109. 航班预订统计
- 1141. 查询近30天活跃用户数
- 1143. 最长公共子序列
- 1148. 文章浏览 I
- 1158. 市场分析 I
- 1393. 股票的资本损益
- 1407. 排名靠前的旅行者
- 1484. 按日期分组销售产品
- 1527. 患某种疾病的患者
- 1581. 进店却未进行过交易的顾客
- 1587. 银行账户概要 II
- 1606. 找到处理最多请求的服务器
- 1667. 修复表中的名字
- 1672. 最富有客户的资产总量
- 1693. 每天的领导和合伙人
- 1729. 求关注者的数量
- 1741. 查找每个员工花费的总时间
- 1757. 可回收且低脂的产品
- 1795. 每个产品在不同商店的价格
- 1873. 计算特殊奖金
- 1890. 2020年最后一次登录
- 1965. 丢失信息的雇员
- 2024. 考试的最大困扰度
- 2028. 找出缺失的观测数据
- 2038. 如果相邻两个颜色均相同则删除当前颜色
- 2039. 网络空闲的时刻
- 2043. 简易银行系统
- 2044. 统计按位或能得到最大值的子集数目
- 2049. 统计最高分的节点数目
- 2055. 蜡烛之间的盘子
- 2100. 适合打劫银行的日子
- 2104. 子数组范围和
- 2200. 找出数组中的所有 K 近邻下标
- 2201. 统计可以提取的工件
- 2202. K 次操作后最大化顶端元素
- 2203. TODO 得到要求路径的最小带权子图
- 2206. 将数组划分成相等数对
- 2207. 字符串中最多数目的子字符串
- 2208. 将数组和减半的最少操作次数
- 2209. 用地毯覆盖后的最少白色砖块
- 2220. 转换数字的最少位翻转次数
- 2221. 数组的三角和
- 2222. 选择建筑的方案数
- 2223. 构造字符串的总得分和
- 2239. 找到最接近 0 的数字
- 2240. 买钢笔和铅笔的方案数
- 2241. 设计一个 ATM 机器
- 2242. 节点序列的最大得分