会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
itdef
上一页
1
···
73
74
75
76
77
78
79
80
81
···
125
下一页
2020年5月9日
Leetcode 394. 字符串解码
摘要: 地址 https://leetcode-cn.com/problems/decode-string/ 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。 你
阅读全文
posted @ 2020-05-09 20:36 itdef
阅读(278)
评论(0)
推荐(0)
Leetcode 257. 二叉树的所有路径
摘要: 地址 https://leetcode-cn.com/problems/binary-tree-paths/ 给定一个二叉树,返回所有从根节点到叶子节点的路径。 说明: 叶子节点是指没有子节点的节点。 示例: 输入: 1 / \ 2 3 \ 5 输出: ["1->2->5", "1->3"] 解释:
阅读全文
posted @ 2020-05-09 12:28 itdef
阅读(219)
评论(0)
推荐(0)
Leetcode 069 x 的平方根
摘要: 地址 https://leetcode-cn.com/problems/sqrtx/ 实现 int sqrt(int x) 函数。 计算并返回 x 的平方根,其中 x 是非负整数。 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。 示例 1: 输入: 4 输出: 2 示例 2: 输入:
阅读全文
posted @ 2020-05-09 11:14 itdef
阅读(172)
评论(0)
推荐(0)
2020年5月7日
Leetcode 784. 字母大小写全排列 DFS
摘要: 地址 https://leetcode-cn.com/problems/letter-case-permutation/ 给定一个字符串S,通过将字符串S中的每个字母转变大小写,我们可以获得一个新的字符串。返回所有可能得到的字符串集合。 示例: 输入: S = "a1b2" 输出: ["a1b2",
阅读全文
posted @ 2020-05-07 23:00 itdef
阅读(315)
评论(0)
推荐(0)
leetcode 134. 加油站 模拟优化
摘要: 恢复内容开始 地址 https://leetcode-cn.com/problems/gas-station/ 在一条环路上有 N 个加油站,其中第 i 个加油站有汽油 gas[i] 升。 你有一辆油箱容量无限的的汽车,从第 i 个加油站开往第 i+1 个加油站需要消耗汽油 cost[i] 升。你从
阅读全文
posted @ 2020-05-07 18:52 itdef
阅读(234)
评论(0)
推荐(0)
2020年5月5日
Leetcode 1438. 绝对差不超过限制的最长连续子数组 单调队列 滑动窗口
摘要: 地址 https://leetcode-cn.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/ 给你一个整数数组 nums ,和一个表示限制的整数 limit,请你返回最长
阅读全文
posted @ 2020-05-05 20:45 itdef
阅读(462)
评论(0)
推荐(0)
Leetcode 406. 根据身高重建队列 贪心
摘要: 地址 https://leetcode-cn.com/problems/queue-reconstruction-by-height/ 假设有打乱顺序的一群人站成一个队列。 每个人由一个整数对(h, k)表示,其中h是这个人的身高,k是排在这个人前面且身高大于或等于h的人数。 编写一个算法来重建这个
阅读全文
posted @ 2020-05-05 17:39 itdef
阅读(277)
评论(0)
推荐(0)
Leetcode 098. 验证二叉搜索树 递归
摘要: 地址 https://leetcode-cn.com/problems/validate-binary-search-tree/ 给定一个二叉树,判断其是否是一个有效的二叉搜索树。 假设一个二叉搜索树具有如下特征: 节点的左子树只包含小于当前节点的数。 节点的右子树只包含大于当前节点的数。 所有左子
阅读全文
posted @ 2020-05-05 13:03 itdef
阅读(166)
评论(0)
推荐(0)
2020年5月4日
Leetcode 045. 跳跃游戏 II 贪心
摘要: 地址 https://leetcode-cn.com/problems/jump-game-ii/ 给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 你的目标是使用最少的跳跃次数到达数组的最后一个位置。 示例: 输入: [2,3,1,1,4] 输
阅读全文
posted @ 2020-05-04 15:45 itdef
阅读(148)
评论(0)
推荐(0)
Leetcode 055. 跳跃游戏 贪心
摘要: 地址 https://leetcode-cn.com/problems/jump-game/ 给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 判断你是否能够到达最后一个位置。 示例 1: 输入: [2,3,1,1,4] 输出: true 解释:
阅读全文
posted @ 2020-05-04 12:50 itdef
阅读(133)
评论(0)
推荐(0)
上一页
1
···
73
74
75
76
77
78
79
80
81
···
125
下一页
导航
博客园
首页
新随笔
联系
订阅
管理
公告