摘要: 235. Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in 阅读全文
posted @ 2023-02-07 10:41 AaronTanooo 阅读(23) 评论(0) 推荐(0)
摘要: 572. Subtree of Another Tree Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure a 阅读全文
posted @ 2023-02-06 18:01 AaronTanooo 阅读(23) 评论(0) 推荐(0)
摘要: 100. Same Tree Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the 阅读全文
posted @ 2023-02-06 16:22 AaronTanooo 阅读(20) 评论(0) 推荐(0)
摘要: 217. Contains Duplicate Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the long 阅读全文
posted @ 2023-02-03 14:08 AaronTanooo 阅读(19) 评论(0) 推荐(0)
摘要: 226. Invert Binary Tree Given the root of a binary tree, invert the tree, and return its root. Constraints: The number of nodes in the tree is in the 阅读全文
posted @ 2023-02-01 14:07 AaronTanooo 阅读(19) 评论(0) 推荐(0)
摘要: 23. Merge k Sorted Lists You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists int 阅读全文
posted @ 2023-02-01 10:33 AaronTanooo 阅读(18) 评论(0) 推荐(0)
摘要: 141. Linked List Cycle Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if the 阅读全文
posted @ 2023-01-31 14:34 AaronTanooo 阅读(15) 评论(0) 推荐(0)
摘要: 19. Remove Nth Node From End of List Given the head of a linked list, remove the nth node from the end of the list and return its head. Constraints: T 阅读全文
posted @ 2023-01-31 14:08 AaronTanooo 阅读(28) 评论(0) 推荐(0)
摘要: 143. Reorder List You are given the head of a singly linked-list. The list can be represented as: L0 → L1 → … → Ln - 1 → Ln Reorder the list to be on 阅读全文
posted @ 2023-01-30 18:29 AaronTanooo 阅读(16) 评论(0) 推荐(0)
摘要: 21. Merge Two Sorted Lists You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list shou 阅读全文
posted @ 2023-01-30 16:26 AaronTanooo 阅读(35) 评论(0) 推荐(0)