Sunday, July 10, 2016

Sorted order printing of a given array that represents a BST

Sorted order printing of a given array that represents a BST
Given an array that stores a complete Binary Search Tree, write a function that efficiently prints the given array in ascending order.
For example, given an array [4, 2, 5, 1, 3], the function should print 1, 2, 3, 4, 5

No comments:

Post a Comment