Loading

随笔分类 -  待分类

1 2 3 4 5 ··· 11 下一页
摘要:Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root n 阅读全文
posted @ 2023-06-30 10:02 Artwalker 阅读(19) 评论(0) 推荐(0)
摘要: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 same if they a 阅读全文
posted @ 2023-06-28 10:24 Artwalker 阅读(15) 评论(0) 推荐(0)
摘要:Given the root of a binary tree, return the inorder traversal of its nodes' values. Example 1: ``` Input: root = [1,null,2,3] Output: [1,3,2] ``` Exam 阅读全文
posted @ 2023-06-27 14:08 Artwalker 阅读(21) 评论(0) 推荐(0)
摘要:Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well. **Examp 阅读全文
posted @ 2023-06-21 12:15 Artwalker 阅读(17) 评论(0) 推荐(0)
摘要:You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb 阅读全文
posted @ 2023-06-19 11:59 Artwalker 阅读(16) 评论(0) 推荐(0)
摘要:Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well. 阅读全文
posted @ 2023-06-19 10:16 Artwalker 阅读(26) 评论(0) 推荐(0)
摘要:Given two binary strings a and b, return their sum as a binary string. **Example 1:** ``` Input: a = "11", b = "1" Output: "100" ``` **Example 2:** `` 阅读全文
posted @ 2023-06-15 11:07 Artwalker 阅读(14) 评论(0) 推荐(0)
摘要:You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered fro 阅读全文
posted @ 2023-06-15 10:51 Artwalker 阅读(34) 评论(0) 推荐(0)
摘要:Given a string s consisting of words and spaces, return the length of the last word in the string. A word is a maximal substring consisting of non-spa 阅读全文
posted @ 2023-06-14 10:41 Artwalker 阅读(20) 评论(0) 推荐(0)

1 2 3 4 5 ··· 11 下一页
Live2D