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 …
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 …
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 …
Read moreDetermining DNA Health HackerRank Solution in C, C++, Java, Python
The median of a list of numbers is essentially its middle element after sorting. The same number of elements occur after it as before. Given a list of numbers with …
Read moreFind the Median HackerRank Solution in C, C++, Java, Python
James found a love letter that his friend Harry has written to his girlfriend. James is a prankster, so he decides to meddle with the letter. He changes all the …
Read moreThe Love-Letter Mystery 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 …
Read moreClosest Numbers 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 …
Read moreBeautiful Binary String 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, …
Read moreThe Full Counting Sort 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., …
Read moreSeparate the Numbers 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 …
Read moreAlternating Characters 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 …
Read moreGemstones HackerRank Solution in C, C++, Java, Python