随笔分类 - leetcode
自己对LeetCode上的题目的理解与解答,如有错误欢迎指正!
摘要:7. Reverse Integer Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321
阅读全文
摘要:24. Swap Nodes in Pairs https://leetcode.com/problems/linked-list-cycle/ Given a linked list, swap every two adjacent nodes and return its head. You m
阅读全文
摘要:题目描述: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the fart
阅读全文
摘要:101. Symmetric Tree 101. Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, th
阅读全文
摘要:100. Same Tree 100. Same Tree Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same
阅读全文
摘要:1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input wou
阅读全文

浙公网安备 33010602011771号