加载中...
标签详情
数组 分类
  文章标签
排序 197 算法 1 django 64 npm 2 Artifactory 2 Docker 2 CI/CD 4 认证 2 MongoDB 2 mongosh 2 权限 2 系统集合 1 版本兼容 1 环境配置 1 时区 1 date-fns 1 前端 1 Vite 1 JavaScript 5 缓存 1 依赖管理 1 Helm 1 Jenkins 2 DNS 1 Passenger 1 性能 1 故障排查 3 Rails 5 Postfix 2 SMTP 1 邮件 3 竞态条件 1 Ruby 1 ActionMailer 2 数据治理 1 OOM 1 内存 1 性能调优 1 Linux 8 配置管理 1 磁盘清理 1 日志 1 运维 2 Shell 4 超时 1 任务调度 1 源码分析 1 logrotate 1 cron 1 Rancher 1 Kubernetes 1 SSH 2 公钥认证 2 Hexo 6 markdown 4 PostgreSQL 1 数据库 19 热搜榜 1 widget 1 media 1 递归 46 字符串 423 动态规划 335 数组 855 哈希表 303 数学 306 设计 93 字典树 33 数据流 14 树 167 深度优先搜索 213 二叉树 151 广度优先搜索 177 二分查找 146 后缀数组 3 滑动窗口 56 哈希函数 16 滚动哈希 10 矩阵 141 前缀和 58 交互 5 栈 110 回溯 85 贪心 163 双指针 131 位运算 122 状态压缩 26 树状数组 14 线段树 19 堆(优先队列) 82 图 71 双连通分量 1 链表 77 拓扑排序 19 数论 7 最短路 10 二叉搜索树 43 字符串匹配 13 记忆化搜索 30 博弈 18 队列 22 单调队列 6 几何 24 组合数学 13 概率与统计 8 并查集 48 最小生成树 2 强连通分量 2 随机化 14 单调栈 34 分治 44 枚举 22 有序集合 29 扫描线 4 桶排序 8 基数排序 2 计数 55 模拟 63 归并排序 8 欧拉回路 2 双向链表 9 脑筋急转弯 9 Java 17 Google 1 整洁代码 1 重构 1 测试 1 python 1 scrapy 1 面向对象编程 2 设计原则 1 CPU缓存 1 多线程 6 计数排序 5 快速选择 8 迭代器 6 水塘抽样 4 拒绝采样 2 Git 1 设计模式 14 GitLab CI 1 DevOps 1 Typora 1 Markdown 1 Vue 1
1-两数之和(Two Sum)
原文链接: https://leetcode-cn.com/problems/two-sum 英文原文Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may n…
2021-12-03
15-三数之和(3Sum)
原文链接: https://leetcode-cn.com/problems/3sum 英文原文Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain…
2021-12-03
18-四数之和(4Sum)
原文链接: https://leetcode-cn.com/problems/4sum 英文原文Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums…
2021-12-03
31-下一个排列(Next Permutation)
原文链接: https://leetcode-cn.com/problems/next-permutation 英文原文Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such an arrangement is not possible, it must rearrange it as the lowes…
2021-12-03
36-有效的数独(Valid Sudoku)
原文链接: https://leetcode-cn.com/problems/valid-sudoku 英文原文Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must…
2021-12-03
37-解数独(Sudoku Solver)
原文链接: https://leetcode-cn.com/problems/sudoku-solver 英文原文Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 must occur exactly once in each row. Each …
2021-12-03
39-组合总和(Combination Sum)
原文链接: https://leetcode-cn.com/problems/combination-sum 英文原文Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the c…
2021-12-03
40-组合总和 II(Combination Sum II)
原文链接: https://leetcode-cn.com/problems/combination-sum-ii 英文原文Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in cand…
2021-12-03
45-跳跃游戏 II(Jump Game II)
原文链接: https://leetcode-cn.com/problems/jump-game-ii 英文原文Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your g…
2021-12-03
46-全排列(Permutations)
原文链接: https://leetcode-cn.com/problems/permutations 英文原文Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],…
2021-12-03
47-全排列 II(Permutations II)
原文链接: https://leetcode-cn.com/problems/permutations-ii 英文原文Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Example 1: Input: nums = [1,1,2] Output: [[1,1,2], [1,2,1], [2,1,1]] …
2021-12-03
48-旋转图像(Rotate Image)
原文链接: https://leetcode-cn.com/problems/rotate-image 英文原文You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix dire…
2021-12-03
51-N 皇后(N-Queens)
原文链接: https://leetcode-cn.com/problems/n-queens 英文原文The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. You…
2021-12-03
54-螺旋矩阵(Spiral Matrix)
原文链接: https://leetcode-cn.com/problems/spiral-matrix 英文原文Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,3,6,9,8,7,4,5] Example 2: Input: matrix = [[1,2,3,4],…
2021-12-03
55-跳跃游戏(Jump Game)
原文链接: https://leetcode-cn.com/problems/jump-game 英文原文You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you …
2021-12-03
56-合并区间(Merge Intervals)
原文链接: https://leetcode-cn.com/problems/merge-intervals 英文原文Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the inpu…
2021-12-03
57-插入区间(Insert Interval)
原文链接: https://leetcode-cn.com/problems/insert-interval 英文原文You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending orde…
2021-12-03
59-螺旋矩阵 II(Spiral Matrix II)
原文链接: https://leetcode-cn.com/problems/spiral-matrix-ii 英文原文Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: Input: n = 3 Output: [[1,2,3],[8,9,4],[7,6,5]] Example 2: Input: n = 1 Outp…
2021-12-03
63-不同路径 II(Unique Paths II)
原文链接: https://leetcode-cn.com/problems/unique-paths-ii 英文原文A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reac…
2021-12-03
64-最小路径和(Minimum Path Sum)
原文链接: https://leetcode-cn.com/problems/minimum-path-sum 英文原文Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or …
2021-12-03
66-加一(Plus One)
原文链接: https://leetcode-cn.com/problems/plus-one 英文原文You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-…
2021-12-03