Migration of MartinKysel.com to Jekyll
I am happy to announce that the page has been migrated from Wordpress to Jekyll and Github pages. Read more about the various improvements done...
Read More
HackerRank 'Real Estate Broker' Solution
You are a real estate broker in ancient Knossos. You have m unsold houses, and each house j has an area, xj, and a minimum price, yj. You also have n clients, and each client i wants a house with an area greater than ai and a price less than or equal to bi. Each client can buy at most one house, and each house can have at most one owner. What is the maximum number of houses you can sell?
Read More
HackerRank 'Balanced Strings' Solution
Consider a string, s, consisting only of the letters `a` and `b`. We say that string s is balanced if both of the following conditions are satisfied...
Read More
HackerRank 'Majority' Solution
Neo has to save the world one last time. One of the battles has cost Neo his eyes. He has to fight the battle with the Deus ex machina.
Read More
HackerRank 'Game of Maximization' Solution
There are n piles of stones, where the ith pile has ai stones. You need to collect the maximum number of stones from these piles
Read More
HackerRank 'Friend Circle Queries' Solution
The population of HackerWorld is 10^9. Initially, none of the people are friends with each other. In order to start a friendship, two persons a and b have to shake hands, where `1 <= a,b <= 10^9`. The friendship relation is transitive, that is if a and b shake hands with each other, a and friends of a become friends with b and friends of b.
Read More