文章 2022-02-16 来自:开发者社区

leetCode 67. Add Binary 字符串

67. Add Binary Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 思路: 1.将两个字符串按数组相加得到新数组。 2.将新数组转换成结果。 代码如下: 1 2 3 4 5 6 7 8 ...

文章 2022-02-16 来自:开发者社区

[LeetCode] Construct Binary Tree from String 从字符串创建二叉树

You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by zero, one or two pairs of parent....

文章 2022-02-16 来自:开发者社区

[LeetCode] Construct String from Binary Tree 根据二叉树创建字符串

You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be represented by empty parenthesis pair "()". And you ....

文章 2022-02-16 来自:开发者社区

[LeetCode] Count Binary Substrings 统计二进制子字符串

Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. Sub...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注