## QHEAP1 HackerRank Solution

In this QHEAP1 HackerRank solution, This question is designed to help you get a better understanding of basic heap operations. There are  types of query: “ ” – Add an element  to the heap. “ ” – Delete the element  from the heap. “” – Print the ...

## Permutation game HackerRank Solution

In this Permutation game HackerRank solution, Alice and Bob play the following game: They choose a permutation of the numbers  to . Alice plays first and they alternate. In a turn, they can remove any one remaining number from the permutation. The game ...

## Weighted Uniform Strings HackerRank Solution

In this Weighted Uniform Strings HackerRank solution, weighted string is a string of lowercase English letters where each letter has a weight. Character weights are  to  from  to  as shown below: The weight of a string is the sum of the weights of its characters. For example: ...

## Lego Blocks HackerRank Solution

In this Lego Blocks HackerRank solution, we have an infinite number of 4 types of lego blocks of sizes given as (depth x height x width): d h w 1 1 1 1 1 2 1 1 3 1 1 ...

## Truck Tour HackerRank Solution

In this Truck Tour HackerRank solution, There is a circle. There are  petrol pumps on that circle. Petrol pumps are numbered  to  (both inclusive). You have two pieces of information corresponding to each of the petrol pump: (1) the amount of petrol that ...

## Chief Hopper HackerRank Solution

In this Chief Hopper HackerRank solution, Chief’s bot is playing an old DOS based game. There is a row of buildings of different heights arranged at each index along a number line. The bot starts at building  and at a height of . ...

## The Maximum Subarray HackerRank Solution

In this The Maximum Subarray HackerRank solution, We define subsequence as any subset of an array. We define a subarray as a contiguous subsequence in an array. Given an array, find the maximum possible sum among: all nonempty subarrays. all nonempty subsequences. We need to Print ...

## Two Characters HackerRank Solution

In this Two Characters HackerRank solution,  we have Given a string and we need remove characters until the string is made up of any two alternating characters. When we choose a character to remove, all instances of that character must ...

## The Coin Change Problem HackerRank Solution

In this The Coin Change Problem HackerRank solution, we have Given an amount and the denominations of coins available, determine how many ways change can be made for amount. There is a limitless supply of each coin type. We need ...

## Equal Stacks HackerRank Solution

In this Equal Stacks HackerRank solution, You have three stacks of cylinders where each cylinder has the same diameter, but they may vary in height. You can change the height of a stack by removing and discarding its topmost cylinder ...