首页
学习
活动
专区
工具
TVP
发布

爱写Bug

公众号:爱写Bug
专栏作者
148
文章
109214
阅读量
27
订阅数
LeetCode 297:二叉树的序列化与反序列化 Serialize and Deserialize Binary Tree
序列化是将一个数据结构或者对象转换为连续的比特位的操作,进而可以将转换后的数据存储在一个文件或者内存中,同时也可以通过网络传输到另一个计算机环境,采取相反方式重构得到原数据。
爱写bug
2020-03-12
6200
LwwtCode 173:二叉搜索树迭代器 Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
爱写bug
2020-03-12
4470
LeetCode 116: 填充每个节点的下一个右侧节点指针
给定一个完美二叉树,其所有叶子节点都在同一层,每个父节点都有两个子节点。二叉树定义如下:
爱写bug
2020-02-26
6370
LeetCode117:填充每个节点的下一个右侧节点指针 II
填充它的每个 next 指针,让这个指针指向其下一个右侧节点。如果找不到下一个右侧节点,则将 next 指针设置为 NULL。
爱写bug
2020-02-26
5150
LeetCode 105: 从前序与中序遍历序列构造二叉树
Given preorder and inorder traversal of a tree, construct the binary tree.
爱写bug
2020-02-26
3560
LeetCode 106: 从中序与后序遍历序列构造二叉树
Given inorder and postorder traversal of a tree, construct the binary tree.
爱写bug
2020-02-26
2980
LeetCode 112: 路径总和 Path Sum
给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。
爱写bug
2020-02-18
6740
LeetCode 589: N 叉树的前序遍历 N-ary Tree Preorder Traversal
Given an n-ary tree, return the preorder traversal of its nodes' values.
爱写bug
2020-01-02
6760
LeetCode 590: N 叉树的后序遍历 N-ary Tree Postorder Traversal
Given an n-ary tree, return the postorder traversal of its nodes' values.
爱写bug
2020-01-02
6010
树的遍历 Traverse a Tree
值得注意的是,当删除树中的节点时,删除过程将按照后序遍历的顺序进行。也就是说,当你删除一个节点时,你将首先删除它的左节点和它的右边的节点,然后再删除节点本身。
爱写bug
2020-01-02
1.1K0
LeetCode 347: 前 K 个高频元素 Top K Frequent Elements
Given a non-empty array of integers, return the K most frequent elements.
爱写bug
2019-12-18
7420
LeetCode 380: 常数时间插入、删除和获取随机元素 Insert Delete GetRandom O(1)
Design a data structure that supports all following operations in average O(1) time.
爱写bug
2019-12-16
9660
LeetCode 454: 四数相加 II 4Sum II
给定四个包含整数的数组列表 A , B , C , D ,计算有多少个元组 (i, j, k, l) ,使得 A[i] + B[j] + C[k] + D[l] = 0。
爱写bug
2019-12-16
6240
LeetCode 3: 无重复字符的最长子串
Given a string, find the length of the longest substring without repeating characters.
爱写bug
2019-12-02
4700
LeetCode 771: 宝石与石头 Jewels and Stones
给定字符串J 代表石头中宝石的类型,和字符串 S代表你拥有的石头。S 中每个字符代表了一种你拥有的石头的类型,你想知道你拥有的石头中有多少是宝石。
爱写bug
2019-11-20
2260
LeetCode 652: 寻找重复的子树 Find Duplicate Subtrees
给定一棵二叉树,返回所有重复的子树。对于同一类的重复子树,你只需要返回其中任意一棵的根结点即可。
爱写bug
2019-11-20
6170
LeetCode 49: 字母异位词分组 Group Anagrams
给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。
爱写bug
2019-11-11
7970
LeetCode 219: 存在重复元素 II Contains Duplicate II
给定一个整数数组和一个整数 k,判断数组中是否存在两个不同的索引 i 和 j,使得 nums [i] = nums [j],并且 i 和 j 的差的绝对值最大为 k。
爱写bug
2019-11-10
3090
LeetCode 350: 两个数组的交集 II Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection.
爱写bug
2019-10-30
4300
LeetCode 387: 字符串中的第一个唯一字符
给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。
爱写bug
2019-10-30
5090
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档