Life -- Code -- Experience: Google Codejam 15 - Standing Ovation - simle problem explained simply
Link: https://code.google.com/codejam/contest/6224486/dashboard#s=p0You advised to go through the problem in above link or read it at the bottom of this blog post.
Problem-solution explantion and in short:
The problem was the simplest one and just needed a little amount of logical reasoning. As the requirement was to get a complete standing ovation, you need to figure out how many friends you need to bring/add to achieve a complete standing ovation.
If some number of people have already stood up and no more people have shyness level equal to or less than the total standing people yet, (i.e. all the rest people have higher shyness level) then we have a break. At this point we need to add friend equal to the amount that would trigger just the people of the next shyness level. And continue this process till the end.
Read full article from Life -- Code -- Experience: Google Codejam 15 - Standing Ovation - simle problem explained simply
No comments:
Post a Comment