Skip to main content
LZX BLOG

LZX BLOG

我很爛

LeetCode
LeetCode
我練習LeetCode
1. Two Sum

1. Two Sum

題目 連結

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.


LZXAbout 1 minLeetCodeEasyArrayHashMap
105. Construct Binary Tree from Preorder and Inorder Traversal

105. Construct Binary Tree from Preorder and Inorder Traversal

題目 連結

Given two integer arrays preorder and inorder where >preorder is the preorder traversal of a binary tree and >inorder is the inorder traversal of the same tree, >construct and return the binary tree.


LZXAbout 1 minLeetCodeMediumHashMapTree
d99. Recover Binary Search Tree

d99. Recover Binary Search Tree

題目 連結

You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure.


LZXAbout 1 minLeetCodeMediumTree