xinyu04

导航

2022年7月24日 #

LeetCode 206 Reverse Linked List 翻转链表

摘要: Given the head of a singly linked list, reverse the list, and return the reversed list. Solution 点击查看代码 /** * Definition for singly-linked list. * str 阅读全文

posted @ 2022-07-24 16:19 Blackzxy 阅读(15) 评论(0) 推荐(0) 编辑

LeetCode 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 should be made by splicing toge 阅读全文

posted @ 2022-07-24 15:34 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

LeetCode 102 Binary Tree Level Order Traversal 层序BFS

摘要: Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Solution 用 $BFS$ 即 阅读全文

posted @ 2022-07-24 05:27 Blackzxy 阅读(5) 评论(0) 推荐(0) 编辑