随笔分类 - 待分类
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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.
阅读全文
摘要: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:** ``
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号