Skip to content
the poor coder

Home / Author

Poor Man

2,994 posts
2020

Hackerrank - Bonetrousle Solution

Here's a humerus joke: Why did Papyrus the skeleton go to the store by himself? Because he had no body to go with him! Did you like it? Don't worry, I've got a ton more. A skele-ton. Once upon a time, Papyrus the…

2020

Hackerrank - Common Child Solution

A string is said to be a child of a another string if it can be formed by deleting 0 or more characters from the other string. Given two strings of equal length, what's the longest string that can be constructed such…

2020

Hackerrank - Sparse Arrays Solution

There is a collection of input strings and a collection of query strings. For each query string, determine how many times it occurs in the list of input strings. For example, given input and , we find instances of ', of…

2020

Hackerrank - Gaming Array Solution

Andy wants to play a game with his little brother, Bob. The game starts with an array of distinct integers and the rules are as follows: Bob always plays first and the two players move in alternating turns. In a single…

2020

Hackerrank - Stock Maximize Solution

Your algorithms have become so good at predicting the market that you now know what the share price of Wooden Orange Toothpicks Inc. (WOT) will be for the next number of days. Each day, you can either buy one share of…

2020

Hackerrank - The Captain's Room Solution

Mr. Anant Asankhya is the manager at the INFINITE hotel. The hotel has an infinite amount of rooms. One fine day, a finite number of tourists come to stay at the hotel. The tourists consist of: → A Captain. → An unknown…

Hackerrank1 min read
2020

Hackerrank - Halloween party Solution

Alex is attending a Halloween party with his girlfriend, Silvia. At the party, Silvia spots the corner of an infinite chocolate bar (two dimensional, infinitely long in width and length). If the chocolate can be served…

2020

Hackerrank - Counting Sort 1 Solution

Comparison Sorting Quicksort usually has a running time of , but is there an algorithm that can sort even faster? In general, this is not possible. Most sorting algorithms are comparison sorts, i.e. they sort a list…

2020

Hackerrank - Frequency Queries Solution

You are given queries. Each query is of the form two integers described below: - : Insert x in your data structure. - : Delete one occurence of y from your data structure, if present. - : Check if any integer is present…

ESC