xinyu04

导航

2022年7月22日 #

LeetCode 116 Populating Next Right Pointers in Each Node 思维

摘要: You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin 阅读全文

posted @ 2022-07-22 16:28 Blackzxy 阅读(17) 评论(0) 推荐(0) 编辑

LeetCode 617 Merge Two Binary Trees DFS+模板

摘要: You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped w 阅读全文

posted @ 2022-07-22 15:15 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

LeetCode 73 Set Matrix Zeroes 思维

摘要: Given an m x n integer matrix matrix, if an element is $0$, set its entire row and column to $0$'s. You must do it in place. Solution 做法并不难,但如果考虑常数空间复 阅读全文

posted @ 2022-07-22 06:15 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

LeetCode 155 Min Stack

摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: MinStack() initializes 阅读全文

posted @ 2022-07-22 02:51 Blackzxy 阅读(3) 评论(0) 推荐(0) 编辑