Given an array of integers. Create a Binary Search Tree from these numbers. If the number is already in the tree, do not insert it (no duplicates).
Find the sum of all leaves in a tree.
The first line contains number n (1≤n≤1000). The second line contains n integers.
Create the Binary Search Tree from input data. Print the sum of all leaves in a tree.
The sum of leaves equals to 1+5+11=17.