You've successfully subscribed to The Poor Coder | Hackerrank Solutions
Great! Next, complete checkout for full access to The Poor Coder | Hackerrank Solutions
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.


Beeze Aal

Hackerrank Standardize Mobile Number Using Decorators Solution

Let's dive into decorators! You are given  mobile numbers. Sort them in ascending order then print them in the standard format shown below: +91 xxxxx xxxxx The given mobile numbers may have ,  or  written before the actual  digit number. Alternatively, there may not be any prefix at all. Input Format
Beeze Aal

HackerEarth - Molly And Flame Solution

Molly is in love with Sherlock. She wants to decide the nature of the relationship between her and Sherlock using the game of FLAME. FLAME stands for: {“Friendship”,”Love”,”Affection”,”Marriage”,”Enemies”} The rules of FLAME are: 1) The names of the two people are taken. 2) Then the common
Beeze Aal

HackerEarth - The colorful street Solution

There is a street by the name of a colorful street in Pretty Town. The residents of the house have decided that they will paint their houses in either Pink, Orange, or Yellow color and not other. They have also decided that no two adjacent houses will have the same
Beeze Aal

HackerEarth - Josh and Hotel Solution

Josh owns a hotel, there are X rooms in the hotel and every room can be allocated to maximum 1 person at a time. If a customer arrives and there are no rooms available, the customer will leave the hotel without staying, thus causing loss to his hotel. Input consists
Beeze Aal

Hackerrank - Divisible Sum Pairs Solution

You are given an array of  integers, , and a positive integer, . Find and print the number of  pairs where  and  +  is divisible by . For example,  and . Our three pairs meeting the criteria are  and . Function Description Complete the divisibleSumPairs function in the editor below. It should return the integer count
Beeze Aal

HackerEarth - Chandu and his game Solution

After setting up the area and his toys. Chandu is up for playing his very first game. His first game is played on a N X N board with some initial stones placed on each cell. He can move each stone in all four direction i.e up,down, left
Beeze Aal

Hackerrank - Special String Again Solution

A string is said to be a special string if either of two conditions is met: All of the characters are the same, e.g. aaa.All characters except the middle one are the same, e.g. aadaa.A special substring is any substring of a string which meets one
Beeze Aal

Hackerrank - Exceptions Solution

ExceptionsErrors detected during execution are called exceptions. Examples: ZeroDivisionError This error is raised when the second argument of a division or modulo operation is zero.>>> a = '1'>>> b = '0'>>> print int(a) / int(b)>>> ZeroDivisionError: integer division or
Beeze Aal

Hackerrank - New Year Chaos Solution

It's New Year's Day and everyone's in line for the Wonderland rollercoaster ride! There are a number of people queued up, and each person wears a sticker indicating their initial position in the queue. Initial positions increment by  from  at the front of the line to  at the back. Any
Beeze Aal

Hackerrank - Minimum Time Required Solution

You are planning production for an order. You have a number of machines that each have a fixed number of days to produce an item. Given that all the machines operate simultaneously, determine the minimum number of days to produce the required order. For example, you have to produce  items.
Beeze Aal

Hackerrank - Sorting: Bubble Sort Solution

Consider the following version of Bubble Sort: for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { // Swap adjacent elements if they are in decreasing order if (a[j] > a[j + 1]) { swap(a[j], a[j + 1]); } } }Given an array
Beeze Aal

Hackerrank - Fraudulent Activity Notifications Solution

HackerLand National Bank has a simple policy for warning clients about possible fraudulent account activity. If the amount spent by a client on a particular day is greater than or equal to  the client's median spending for a trailing number of days, they send the client a notification about potential