一只研究僧er


  • 首页

  • 标签

  • 分类

  • 文档

  • Search

leetcode47.全排列 II

Posted on 2023-03-10 | In leetcode
Words count in article: 282 | Reading time ≈ 1

给定一个可包含重复数字的序列 nums ,按任意顺序 返回所有不重复的全排列。

Read more »

leetcode46.全排列

Posted on 2023-03-10 | In leetcode
Words count in article: 216 | Reading time ≈ 1

给定一个不含重复数字的数组 nums ,返回其 所有可能的全排列 。你可以 按任意顺序 返回答案。

Read more »

leveldb_slice

Posted on 2023-03-10 | In leveldb源码学习
Words count in article: 602 | Reading time ≈ 3

Slice切片。切片是一种简单的数据结构,包含指向数据的指针和数据的大小。

多个线程可以在没有外部同步的情况下在Slice上调用const方法,但是如果任何线程可以调用非const方法,则访问同一Slice的所有线程都必须使用外部同步。

Read more »

leetcode45.跳跃游戏 II

Posted on 2023-03-10 | In leetcode
Words count in article: 599 | Reading time ≈ 2

给定一个长度为 n 的 0 索引整数数组 nums。初始位置为 nums[0]。

每个元素 nums[i] 表示从索引 i 向前跳转的最大长度。换句话说,如果你在 nums[i] 处,你可以跳转到任意 nums[i + j] 处:

  • 0 <= j <= nums[i]
  • i + j < n

返回到达 nums[n - 1] 的最小跳跃次数。生成的测试用例可以到达 nums[n - 1]。

Read more »

leetcode44.通配符匹配

Posted on 2023-03-10 | In leetcode
Words count in article: 573 | Reading time ≈ 2

给定一个字符串 (s) 和一个字符模式 (p) ,实现一个支持 '?' 和 '*' 的通配符匹配。

1
2
'?' 可以匹配任何单个字符。
'*' 可以匹配任意字符串(包括空字符串)。

两个字符串完全匹配才算匹配成功。

说明:

  • s 可能为空,且只包含从 a-z 的小写字母。
  • p 可能为空,且只包含从 a-z 的小写字母,以及字符 ? 和 *。
Read more »

leetcode43.字符串相乘

Posted on 2023-03-10 | In leetcode
Words count in article: 275 | Reading time ≈ 1

给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。

注意:不能使用任何内置的 BigInteger 库或直接将输入转换为整数。

Read more »

leetcode42.接雨水

Posted on 2023-03-10 | In leetcode
Words count in article: 249 | Reading time ≈ 1

给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。

Read more »

leetcode41.缺失的第一个正数

Posted on 2023-03-10 | In leetcode
Words count in article: 197 | Reading time ≈ 1

给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。

请你实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案。

Read more »

leetcode40.组合总和 II

Posted on 2023-03-08 | In leetcode
Words count in article: 298 | Reading time ≈ 1

给定一个候选人编号的集合 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。

candidates 中的每个数字在每个组合中只能使用 一次 。

注意:解集不能包含重复的组合。

Read more »

leetcode39.组合总和

Posted on 2023-03-08 | In leetcode
Words count in article: 345 | Reading time ≈ 1

给你一个 无重复元素 的整数数组 candidates 和一个目标整数 target ,找出 candidates 中可以使数字和为目标数 target 的 所有 不同组合 ,并以列表形式返回。你可以按 任意顺序 返回这些组合。

candidates 中的 同一个 数字可以 无限制重复被选取 。如果至少一个数字的被选数量不同,则两种组合是不同的。

对于给定的输入,保证和为 target 的不同组合数少于 150 个。

Read more »
<123…7>

67 posts
3 categories
31 tags
RSS
© 2023 刘恒 | Site words total count: 26.8k
Powered by Hexo
|
Theme — NexT.Pisces v5.1.4
0%