Блог пользователя taap_cader

Автор taap_cader, история, 3 года назад, По-английски

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.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится