会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
玉树临风,仙姿佚貌
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
16
17
18
19
20
21
22
23
24
···
30
下一页
2021年9月20日
LeetCode-344-反转字符串
摘要: 反转字符串 题目描述:编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。 不要给另外的数组分配额外的空间,你必须原地修改输入数组、使用 O(1) 的额外空间解决这一问题。 你可以假设数组中的所有字符都是 ASCII 码表中的可打印字符。 示例说明请见Lee
阅读全文
posted @ 2021-09-20 07:53 醉舞经阁
阅读(45)
评论(0)
推荐(2)
2021年9月19日
LeetCode-342-4的幂
摘要: 4的幂 题目描述:给定一个整数,写一个函数来判断它是否是 4 的幂次方。如果是,返回 true ;否则,返回 false 。 整数 n 是 4 的幂次方需满足:存在整数 x 使得 n == \(4^{x}\) 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://
阅读全文
posted @ 2021-09-19 19:43 醉舞经阁
阅读(48)
评论(0)
推荐(2)
2021年9月18日
LeetCode-338-比特位计数
摘要: 比特位计数 题目描述:给定一个非负整数 num。对于 0 ≤ i ≤ num 范围中的每个数字 i ,计算其二进制数中的 1 的数目并将它们作为数组返回。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/co
阅读全文
posted @ 2021-09-18 08:07 醉舞经阁
阅读(37)
评论(0)
推荐(2)
2021年9月17日
LeetCode-326-3的幂
摘要: 3的幂 题目描述:给定一个整数,写一个函数来判断它是否是 3 的幂次方。如果是,返回 true ;否则,返回 false 。 整数 n 是 3 的幂次方需满足:存在整数 x 使得 n == \(3^{x}\) 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://
阅读全文
posted @ 2021-09-17 08:16 醉舞经阁
阅读(59)
评论(0)
推荐(2)
2021年9月16日
LeetCode-303-区域和检索 - 数组不可变
摘要: 区域和检索 - 数组不可变 题目描述:给定一个整数数组 nums,求出数组从索引 i 到 j(i ≤ j)范围内元素的总和,包含 i、j 两点。 实现 NumArray 类: NumArray(int[] nums) 使用数组 nums 初始化对象 int sumRange(int i, int j
阅读全文
posted @ 2021-09-16 08:01 醉舞经阁
阅读(30)
评论(0)
推荐(2)
2021年9月15日
LeetCode-283-移动零
摘要: 移动零 题目描述:给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/move-zeroes/ 著作权归领扣网络所有
阅读全文
posted @ 2021-09-15 08:44 醉舞经阁
阅读(49)
评论(0)
推荐(2)
2021年9月14日
LeetCode-268-丢失的数字
摘要: 丢失的数字 题目描述:给定一个包含 [0, n] 中 n 个数的数组 nums ,找出 [0, n] 这个范围内没有出现在数组中的那个数。 进阶: 你能否实现线性时间复杂度、仅使用额外常数空间的算法解决此问题? 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https:/
阅读全文
posted @ 2021-09-14 08:07 醉舞经阁
阅读(53)
评论(0)
推荐(2)
2021年9月13日
LeetCode-263-丑数
摘要: 丑数 题目描述:给你一个整数 n ,请你判断 n 是否为 丑数 。如果是,返回 true ;否则,返回 false 。 丑数 就是只包含质因数 2、3 和/或 5 的正整数。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/p
阅读全文
posted @ 2021-09-13 07:25 醉舞经阁
阅读(67)
评论(0)
推荐(2)
2021年9月12日
LeetCode-258-各位相加
摘要: 各位相加 题目描述:给定一个非负整数 num,反复将各个位上的数字相加,直到结果为一位数。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/add-digits/ 著作权归领扣网络所有。商业转载请联系官方授权
阅读全文
posted @ 2021-09-12 09:24 醉舞经阁
阅读(45)
评论(0)
推荐(2)
2021年9月11日
LeetCode-237-删除链表中的节点
摘要: 删除链表中的节点 题目描述:请编写一个函数,使其可以删除某个链表中给定的(非末尾)节点。传入函数的唯一参数为 要被删除的节点。 示例说明请见LeetCode官网。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/delete-node-in-a
阅读全文
posted @ 2021-09-11 07:15 醉舞经阁
阅读(38)
评论(0)
推荐(2)
上一页
1
···
16
17
18
19
20
21
22
23
24
···
30
下一页
公告