What I am trying to do.
sort the weights in increasing order.
keep on counting the number of gondolas required as the array is traversed. If the gondola can’t hold a person, update the gondola weight, and increase the gondola count.
Still, the correct answer is not coming, I tried many ways to debug my code but couldn’t find what is wrong in my approach.
Pls, help me.