greedy method does not seems to work.
removing greedy method as it is flawed.
flaw : each time a new book is kept vertical of a general width (and not 1 or 2)
we could shift multiple books horizontally. this cannot be taken care as it will increase the complexity to o(n2logn) or higher.