Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree.A height-balanced bin
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 no
Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).root 노드를 기준으로 한칸씩 아래로 내려갈 때 마다 left, right
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 ar
Given an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Return the
Given the root of a binary tree, return the inorder traversal of its nodes' values.Example 1:Input: root = 1,null,2,3Output: 1,3,2
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in num
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if i
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c
Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists
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 ar