Skip to content
C

Minimum and Maximum in BST

Easyjavapythonccppjavascript

Find the smallest and largest values stored in a Binary Search Tree.

Input Format

The first line contains an integer M. The second line contains M space-separated tokens (integers or null) — the BST in level order.

Output Format

Print two lines: Min = x Max = y

Input (stdin)

Output

Run your code to see output here...