[LeetCode] 230. Kth Smallest Element in a BST - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/kth-smallest-element-in-a-bst/description/ Kth Smallest Element in a BST - LeetCode Kth Smallest Element in a BST - Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree. Example 1: [https://assets.leetcode.com/uploads/2021/01/28/kthtree1.jpg] Inpu leetcode.com 문제 Given the root..
[LeetCode] 98. Validate Binary Search Tree - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/validate-binary-search-tree/description/ Validate Binary Search Tree - LeetCode Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: * The left subtree of a node contains only nodes with keys less than the node's key. * The right subtree leetcode.com 문제 Given the root o..
HYOJUN
'bst' 태그의 글 목록