Skip to content
the poor coder

Home / Topics / #algorithms

#Algorithms

191 posts · page 2 of 10
2020

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…

2020

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…

2020

Hackerrank - Exceptions Solution

Exceptions Errors 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…

2020

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…

ESC