## Shortest Job First in Operating System

As the name itself says that the shortest is having the least burst time we are going to show you that first that is right in shortest job first and …

## Convoy Effect in Operating System

One disadvantage of FCFS is there is if there is something called a convoy effect. When a process is having a heavy burst time then all the processes which are …

## Determining DNA Health HackerRank Solution in C, C++, Java, Python

DNA is a nucleic acid present in the bodies of living things. Each piece of DNA contains a number of genes, some of which are beneficial and increase the DNA’s …

## Find the Median HackerRank Solution in C, C++, Java, Python

Sorting is useful as the first step in many different tasks. The most common task is to make finding things easier, but there are other uses as well. In this …

## Beautiful Binary String HackerRank Solution in C, C++, Java, Python

Alice has a binary string. She thinks a binary string is beautiful if and only if it doesn’t contain the substring “010”. In one step, Alice can change a 0 …

## The Full Counting Sort HackerRank Solution in C, C++, Java, Python

Use the counting sort to order a list of strings associated with integers. If two strings are associated with the same integer, they must be printed in their original order, …

## Separate the Numbers HackerRank Solution in C, C++, Java, Python

A numeric string,s , is beautiful if it can be split into a sequence of two or more positive integers,a[1],a[2],…,a[n], , satisfying the following conditions: a[i]-a[i-1]=1 for any 1<i<=n (i.e., …

## Alternating Characters HackerRank Solution in C, C++, Java, Python

You are given a string containing characters A and B only. Your task is to change it into a string such that there are no matching adjacent characters. To do …

## Gemstones HackerRank Solution in C, C++, Java, Python

There is a collection of rocks where each rock has various minerals embeded in it. Each type of mineral is designated by a lowercase letter in the range ascii[a-z]. There …

## Counting Sort 2 HackerRank Solution in C, C++, Java, Python

Comparison Sorting Quicksort usually has a running time of n*log(n), but is there an algorithm that can sort even faster? In general, this is not possible. Most sorting algorithms are …