![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
shensyx
这个作者很懒,什么都没留下…
展开
-
leetcode tree of good ideas(树)
题目1:Convert Sorted Array to Binary Search Tree(树,递归算法)Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree...原创 2018-12-21 08:59:31 · 89 阅读 · 0 评论 -
leetcode ,树,逻辑错误
题目1:Minimum Depth of Binary Tree题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.Note...原创 2018-12-21 13:35:10 · 89 阅读 · 0 评论 -
来自leetcode的英语单词笔记2018/12/15
a原创 2018-12-21 16:18:30 · 215 阅读 · 0 评论 -
leetcode,树,递归算法,Binary Tree Paths
题目:Given a binary tree, return all root-to-leaf paths.Note: A leaf is a node with no children.Example:Input: 1 / \2 3 \ 5Output: ["1->2->5", "1->3"]Ex原创 2018-12-24 09:13:01 · 98 阅读 · 0 评论 -
leetcode,脑筋急转弯,灯泡开关问题
题目初始时有 n 个灯泡关闭。 第 1 轮,你打开所有的灯泡。 第 2 轮,每两个灯泡你关闭一次。 第 3 轮,每三个灯泡切换一次开关(如果关闭则开启,如果开启则关闭)。第 i 轮,每 i 个灯泡切换一次开关。 对于第 n 轮,你只切换最后一个灯泡的开关。 找出 n 轮后有多少个亮着的灯泡。示例:输入: 3输出: 1 解释: 初始时, 灯泡状态 [关闭, 关闭, 关闭].第一轮后, ...原创 2018-12-24 10:03:52 · 945 阅读 · 0 评论 -
leetcode,脑筋急转弯,字符串
题目在一个由 ‘L’ , ‘R’ 和 ‘X’ 三个字符组成的字符串(例如"RXXLRXRXL")中进行移动操作。一次移动操作指用一个"LX"替换一个"XL",或者用一个"XR"替换一个"RX"。现给定起始字符串start和结束字符串end,请编写代码,当且仅当存在一系列移动操作使得start可以转换成end时, 返回True。示例 :输入: start = "RXXLRXRXL",原创 2018-12-24 11:30:55 · 153 阅读 · 0 评论 -
leetcode用到的函数汇总
reverse();isalnum();tolower();原创 2018-12-26 08:09:10 · 888 阅读 · 0 评论