原题网址:https://www.lintcode.com/problem/count-and-say/description 描述 报数指的是,按照其中的整数的顺序进行报数,然后得到下一个数。如下所示: 1, 11, 21, 1211, 111221, ... 1 读作 "one 1" -> 11 ...
分类:
其他好文 时间:
2018-06-25 15:01:51
阅读次数:
188
原题网址:https://www.lintcode.com/problem/reverse-integer/description 描述 将一个整数中的数字进行颠倒,当颠倒后的整数溢出时,返回 0 (标记为 32 位整数)。 描述 描述 将一个整数中的数字进行颠倒,当颠倒后的整数溢出时,返回 0 ( ...
分类:
其他好文 时间:
2018-06-24 16:56:57
阅读次数:
120
Description Write a method to replace all spaces in a string with %20. The string is given in a characters array, you can assume it has enough space f ...
分类:
编程语言 时间:
2018-06-24 13:14:29
阅读次数:
173
原题网址:https://www.lintcode.com/problem/add-binary/description 描述 给定两个二进制字符串,返回他们的和(用二进制表示)。 描述 描述 给定两个二进制字符串,返回他们的和(用二进制表示)。 给定两个二进制字符串,返回他们的和(用二进制表示)。 ...
分类:
其他好文 时间:
2018-06-24 00:33:15
阅读次数:
166
原题网址:https://www.lintcode.com/problem/plus-one/description 描述 给定一个非负数,表示一个数字数组,在该数的基础上+1,返回一个新的数组。 该数字按照数位高低进行排列,最高位的数在列表的最前面。 描述 描述 给定一个非负数,表示一个数字数组, ...
分类:
其他好文 时间:
2018-06-23 01:29:43
阅读次数:
148
Description Given two strings, write a method to decide if one is a permutation of the other. Description Description Given two strings, write a metho ...
分类:
编程语言 时间:
2018-06-22 17:49:37
阅读次数:
238
Description Determine the number of bits required to flip if you want to convert integer n to integer m. Description Description Determine the number ...
分类:
编程语言 时间:
2018-06-19 19:28:37
阅读次数:
152
原题网址:https://www.lintcode.com/problem/binary-tree-path-sum/description 描述 给定一个二叉树,找出所有路径中各节点相加总和等于给定 目标值 的路径。 一个有效的路径,指的是从根节点到叶节点的路径。 描述 描述 给定一个二叉树,找出 ...
分类:
其他好文 时间:
2018-06-19 14:44:39
阅读次数:
165
原题网址:https://www.lintcode.com/problem/clone-binary-tree/description 描述 深度复制一个二叉树。 给定一个二叉树,返回一个他的 克隆品 。 描述 描述 深度复制一个二叉树。 给定一个二叉树,返回一个他的 克隆品 。 深度复制一个二叉树 ...
分类:
其他好文 时间:
2018-06-18 22:16:51
阅读次数:
398
原题网址:https://www.lintcode.com/problem/subtree/description 描述 有两个不同大小的二叉树: T1 有上百万的节点; T2 有好几百的节点。请设计一种算法,判定 T2 是否为 T1的子树。 描述 描述 有两个不同大小的二叉树: T1 有上百万的节 ...
分类:
其他好文 时间:
2018-06-18 18:13:41
阅读次数:
147