上一页 1 2 3 4 5 6 ··· 28 下一页
摘要: Source Problem Statement Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a bina 阅读全文
posted @ 2024-02-03 13:05 凌雨尘 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Source Problem Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the rootnode down to 阅读全文
posted @ 2024-01-07 21:05 凌雨尘 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Source Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root 阅读全文
posted @ 2023-12-20 20:51 凌雨尘 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Source Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree 阅读全文
posted @ 2023-11-04 21:30 凌雨尘 阅读(6) 评论(0) 推荐(0) 编辑
摘要: Source Given a binary tree, return the postorder traversal of its nodes' values. Example Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. Challe 阅读全文
posted @ 2023-10-14 15:35 凌雨尘 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Source Given a binary tree, return the inorder traversal of its nodes' values. Example Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,3,2]. Challeng 阅读全文
posted @ 2023-09-02 14:29 凌雨尘 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Source Given a binary tree, return the preorder traversal of its nodes' values. Note Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Example Ch 阅读全文
posted @ 2023-08-12 22:28 凌雨尘 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Source Problem Remove all elements from a linked list of integers that have value val. Example Given 1->2->3->3->4->5->3, val = 3, you should return t 阅读全文
posted @ 2023-07-22 14:07 凌雨尘 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Source Problem Given a linked list, swap every two adjacent nodes and return its head. Example Given 1->2->3->4, you should return the list as 2->1->4 阅读全文
posted @ 2023-06-11 13:40 凌雨尘 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Source Problem Given a list, rotate the list to the right by k places, where k is non-negative. Example Given 1->2->3->4->5 and k = 2, return 4->5->1- 阅读全文
posted @ 2023-05-02 14:17 凌雨尘 阅读(3) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 28 下一页