783. Minimum Distance Between BST Nodes

Easy

Problem:

Return the smallest difference in value between two nodes.

https://leetcode.com/problems/minimum-distance-between-bst-nodes/arrow-up-right

Solution:

Wa can compare the previous traversal value with the current value while doing an inorder traversal.

Iteration: DFS

Last updated