Algorithm Question

Revision en1, by 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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English taap_cader 2021-04-26 16:40:16 514 Initial revision (published)