본문 바로가기

Programming/#Algorithm

[알고리즘] Leetcode #783 이진 탐색 트리(BST) 노드 간 최소 거리 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Given the root of a Binary Search Tree (BST), return the minimum difference between the values of any two different nodes in the tree. 입출력 예 Example 1: Input: roo.. 더보기
[알고리즘] Leetcode #938 이진 탐색 트리(BST) 합의 범위 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. .. 더보기
[알고리즘] Leetcode #1038 이진탐색트리(BST)를 더 큰 수의 합계 트리로 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all .. 더보기
[알고리즘] Leetcode #108 정렬된 배열의 이진 탐색 트리 변환 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 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 binary tree is.. 더보기
[알고리즘] Leetcode #310 최소 높이 트리 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree. Gi.. 더보기
[알고리즘] Leetcode #110 균형 이진 트리 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the left and right .. 더보기
[알고리즘] Leetcode #617 두 이진 트리 병합 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the oth.. 더보기
[알고리즘] Leetcode #226 이진 트리 반전 (Python) ↓↓↓ 아래는 내 리트코드 계정 ↓↓↓ leetcode.com/Jiwon_Lee/ Jiwon Lee - LeetCode Profile Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 설명 Given the root of a binary tree, invert the tree, and return its root. 입출력 예 Example 1: Input: root = [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1] Example 2: Input: ro.. 더보기