2020年5月9日

摘要: 地址 https://leetcode-cn.com/problems/decode-string/ 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。 你 阅读全文
posted @ 2020-05-09 20:36 itdef 阅读(278) 评论(0) 推荐(0)
摘要: 地址 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)
摘要: 地址 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)

导航