text: Function to construct a tree such that there are no two adjacent nodes with the same weight
code: void construct_tree ( int weights [ ] , int n ) { int minimum = * min_element ( weights , weights + n ) ; int maximum = * max_element ( weights , weights + n ) ;