Less than 1 minute
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.
About 1 min
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.
About 1 min
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.
About 1 min
Less than 1 minute