...

/

Solution: Greedy Algorithms

Solution: Greedy Algorithms

Solution to the problem related to greedy algorithms.

Let's practice what we've learned so far.

Task

We’ve been hired to store a sequence of nn books on shelves in a library. The order of the books is fixed by the cataloging system and can’t be changed; each shelf must store a contiguous interval of the given sequence of books. We are given two arrays H[1..n]H[1 .. n] ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy