I am currently working on the problem joi16_skyscraper, which applies a connected-component DP technique. Although I have read several posts, I still do not understand how the DP works. Could someone explain the advantages of dividing problem into connected components and why the elements must be inserted in increasing order?








