2021年2月18日

摘要: 地址 https://leetcode-cn.com/problems/shu-zu-zhong-chu-xian-ci-shu-chao-guo-yi-ban-de-shu-zi-lcof/ 数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字。 你可以假设数组是非空的,并且给定的数组总是 阅读全文
posted @ 2021-02-18 23:03 itdef 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 地址 https://leetcode-cn.com/problems/zi-fu-chuan-de-pai-lie-lcof/ 输入一个字符串,打印出该字符串中字符的所有排列。 你可以以任意顺序返回这个字符串数组,但里面不能有重复元素。 示例: 输入:s = "abc" 输出:["abc","ac 阅读全文
posted @ 2021-02-18 22:20 itdef 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 地址 https://leetcode-cn.com/problems/xu-lie-hua-er-cha-shu-lcof/ 请实现两个函数,分别用来序列化和反序列化二叉树。 示例: 你可以将以下二叉树: 1 / \ 2 3 / \ 4 5 序列化为 "[1,2,3,null,null,4,5]" 阅读全文
posted @ 2021-02-18 12:30 itdef 阅读(84) 评论(0) 推荐(0) 编辑

导航