Clear | Clear, Recently Asked Online Assessments in 2026 | Library Stacking Problem

Question · Posted Apr 2026

1. Library Stacking Problem Problem Statement: Ahmad the new library manager, wants to organize books in the best way possible. He has N books each having W_i width and H_i height. He wants to stack his books on some bookshelves. However, he has to stack his books in order. This means that books from 1 to k (for some value of k) should be stacked on the first shelf, stacking on the second shelf should start from book k+1, and ...

The full answer & interview discussion are available to premium members.

Log in Create a free account