## 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… Read More »

Prerequisite : Partition allocation methods Worst Fit allocates a process to the partition which is largest sufficient among the freely available partitions available in the… Read More »

Prerequisite : Partition allocation methods Best fit allocates the process to a partition which is the smallest sufficient partition among the free available partitions. Example:… Read More »

Prerequisite : Partition Allocation Methods In the first fit, partition is allocated which is first sufficient from the top of Main Memory. Example : Input… Read More »

Given an array arr[], find the lexicographically smallest array that can be obtained after performing at maximum of k consecutive swaps. For example:- Input: arr[]… Read More »

Shortest job first (SJF) or shortest job next, is a scheduling policy that selects the waiting process with the smallest execution time to execute next.… Read More »

Maximum flow problems involve finding a feasible flow through a single-source, single-sink flow network that is maximum. Let’s take an image to explain how above… Read More »

Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights.… Read More »

Given a paper of size A x B. Task is to cut the paper into squares of any size. Find the minimum number of squares… Read More »

Given two arrays, A and B, of equal size n, the task is to find the minimum value of A[0] * B[0] + A[1] *… Read More »

Given three stack of the positive numbers, the task is to find the possible equal maximum sum of the stacks with removal of top elements… Read More »

Given an array of digits (values are from 0 to 9), find the minimum possible sum of two numbers formed from digits of the array.… Read More »

Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation… Read More »

Given a directed graph and a source node and destination node, we need to find how many edges we need to reverse in order to… Read More »

A board of length m and width n is given, we need to break this board into m*n squares such that cost of breaking is… Read More »