Please help me to solve this algorithm into java source code(Algorithm)
Give the information of n buildings (L,R,H) which are the left position, right position, and the height of the building, respectively.
Find the skyline position of the n buildings in the form (position along x-axis, height, position along x-axis, height, ...)
Ex: Give 3 buildings with (5,6,8), (7,11,9), (2,13,4), the answer is (1, 13, 4, 0, 5, 6, 7, 11, 9, 0)