Category Archives: Greedy

Top 20 Greedy Algorithms Interview Questions

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algorithms are used for optimization problems. ‘Recent Articles’ on Greedy Algorithms ‘Coding Problems’ on Greedy Algorithms ‘Quiz’ on Greedy Algorithms ‘Videos’ on Greedy Algorithms   Activity Selection Problem… Read More »

Program for Worst Fit algorithm in Memory Management

Prerequisite : Partition allocation methods Worst Fit allocates a process to the partition which is largest sufficient among the freely available partitions available in the main memory. If a large process comes at a later stage, then memory will not have space to accommodate it. Example: Input : blockSize[] = {100, 500, 200, 300, 600};… Read More »