Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3feb1a4

Browse files
committed
Create README - LeetHub
1 parent 425d3a8 commit 3feb1a4

File tree

1 file changed

+26
-0
lines changed
  • 0783-minimum-distance-between-bst-nodes

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<h2><a href="https://leetcode.com/problems/minimum-distance-between-bst-nodes/">783. Minimum Distance Between BST Nodes</a></h2><h3>Easy</h3><hr><div><p>Given the <code>root</code> of a Binary Search Tree (BST), return <em>the minimum difference between the values of any two different nodes in the tree</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/05/bst1.jpg" style="width: 292px; height: 301px;">
6+
<pre><strong>Input:</strong> root = [4,2,6,1,3]
7+
<strong>Output:</strong> 1
8+
</pre>
9+
10+
<p><strong class="example">Example 2:</strong></p>
11+
<img alt="" src="https://assets.leetcode.com/uploads/2021/02/05/bst2.jpg" style="width: 282px; height: 301px;">
12+
<pre><strong>Input:</strong> root = [1,0,48,null,null,12,49]
13+
<strong>Output:</strong> 1
14+
</pre>
15+
16+
<p>&nbsp;</p>
17+
<p><strong>Constraints:</strong></p>
18+
19+
<ul>
20+
<li>The number of nodes in the tree is in the range <code>[2, 100]</code>.</li>
21+
<li><code>0 &lt;= Node.val &lt;= 10<sup>5</sup></code></li>
22+
</ul>
23+
24+
<p>&nbsp;</p>
25+
<p><strong>Note:</strong> This question is the same as 530: <a href="https://leetcode.com/problems/minimum-absolute-difference-in-bst/" target="_blank">https://leetcode.com/problems/minimum-absolute-difference-in-bst/</a></p>
26+
</div>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /