Golden award for dividing The Kingdom

In the last few months I didn’t have much spare time for writing posts on this blog or maybe I was just being lazy. But that doesn’t mean that nothing interesting was happening during this period. So the next few post will be some “retro” stuff from the previous months and I think deserve to be published here. This post will be about the “Digital Gold” Codility challenge.

DivideTheKingdom

I got a “Golden Award” for this solution so here are the details about the challenge task:

An old king wants to divide his kingdom between his two sons. He is well known for his justness and wisdom, and he plans to make a good use of both of these attributes while dividing his kingdom.Read More »

Advertisements

Using free theater tickets can be such a tough decision – this algorithm is here to tell you how many different options you have

Kate is a girl that was given  a very nice birthday gift Рthree theater tickets. She can pick three performances in the next N days that she would like to attend.  On the program, performances are named by integers. Every day, one performance is staged. Kate wants to choose three days (not necessarily consecutive) to go to the theater.

In how many ways can she use her tickets?

Matrix.jpg

Briefly that was the task in the Zinc 2018 Challenge on the Codility platform, sixth challenge that was published this year and sixth Golden Award for my solution.Read More »