Algorithm Question

Правка en1, от taap_cader, 2021-04-26 16:40:16

Suppose there is an array of integers representing values of blocks. We have to create towers such that (i)th block in tower has value less than or equal to (i-1)th.
a. Calculate the height of tallest tower.
b. Calculate the minimum number of towers to equip all the blocks.
Obviously, the the answer of first part is longest decreasing array. I am not sure about second part but according to me the answer will the longest strictly increasing array.
Correct me if I am wrong.


  Rev. Язык Кто Когда Δ Комментарий
en1 Английский taap_cader 2021-04-26 16:40:16 514 Initial revision (published)