Split n into maximum composite numbers
Given n, print the maximum number of composite numbers that sum up to n. First few composite numbers are 4, 6, 8, 9, 10, 12,… Read More »
Given n, print the maximum number of composite numbers that sum up to n. First few composite numbers are 4, 6, 8, 9, 10, 12,… Read More »
Given an array of N integers. You are allowed to rearrange the element of the array. The task is to find the maximum value of… Read More »
Given a string S and an integer K. The task is to find lexicographically largest subsequence of S, say T, such that every character in… Read More »
Given an array of size n that has the following specifications: Each element in the array contains either a policeman or a thief. Each policeman… Read More »
You are given a lock which is made up of n-different circular rings and each ring has 0-9 digit printed serially on it. Initially all… Read More »
A greedy algorithm selects a candidate greedily (local optimum) and adds it to the current solution provided that it doesn’t corrupt the feasibility. If the… Read More »
We are given N jobs, and their starting and ending times. We can do two jobs simultaneously at a particular moment. If one job ends… Read More »
In a stock market, there is a product with its infinite stocks. The stock prices are given for N days, where arr[i] denotes the price… Read More »
Prerequisite: Partition allocation methods What is Next Fit ? Next fit is a modified version of ‘first fit’. It begins as first fit to find… Read More »
Given n tasks with arrival time, priority and number of time units they need. We need to schedule these tasks on a single resource. The… Read More »
You are given a string of 2N characters consisting of N ‘[‘ brackets and N ‘]’ brackets. A string is considered balanced if it can… Read More »
In previous post, we have discussed Set 1 of SJF i.e. non-preemptive. In this post we will discuss the preemptive version of SJF known as… Read More »
Given length of wall w and shelves of two lengths m and n, find the number of each type of shelf to be used and… Read More »
Prerequisite : Page Replacement Algorithms In operating systems that use paging for memory management, page replacement algorithm are needed to decide which page needed to… Read More »
Prerequisite: Page Replacement Algorithms In operating systems that use paging for memory management, page replacement algorithm are needed to decide which page needed to be… Read More »