Re: [闲聊] 每日LeetCode

楼主: Rushia (みけねこ的鼻屎)   2023-01-10 09:37:21
100. Same Tree
给你两棵树判断它们是不是一样。
Example:
https://assets.leetcode.com/uploads/2020/12/20/ex1.jpg
Input: p = [1,2,3], q = [1,2,3]
Output: true
https://assets.leetcode.com/uploads/2020/12/20/ex2.jpg
Input: p = [1,2], q = [1,null,2]
Output: false
思路:
1.毫无反应就只是递回检查
Java Code:

Links booklink

Contact Us: admin [ a t ] ucptt.com