The function finds the element with the longest height and brings all other elements to this height parameter