Sometimes I feel I am so dumb that I should not be allowed to solve puzzles. I spent the complete day today to figure out my mistake in this simple problem on codechef june long contest. I figured out the solution in first 10 minutes but was handling a simple corner case in the wrong way. The worst part is I tested my code on the corner case multiple times and overlooked the error. What a dumbass I have turned out to be. Any way, I am still not able to figure out the solution to the next problem.
Dheeraj Baba also told me some puzzles today...I will mention them here and think about them.
1) One based on the famous handshaking lemma: In a party there are 5 couples including the host. Every person in the party shakes hand with every person he doesnt know. At the end of the party the male host announces that he asked every one the number of hands the shook and everyone gave a different answer. How many hands did the female host shook? The host mayn't know everyone they invited.
2) Given a tree, find the two vertex which are maximum distance apart?
3) What is the minimum number of coins of giver denomination required to make a sum of N? see this
4) Number of possible configurations of a rubic's cube?
Dheeraj Baba also told me some puzzles today...I will mention them here and think about them.
1) One based on the famous handshaking lemma: In a party there are 5 couples including the host. Every person in the party shakes hand with every person he doesnt know. At the end of the party the male host announces that he asked every one the number of hands the shook and everyone gave a different answer. How many hands did the female host shook? The host mayn't know everyone they invited.
2) Given a tree, find the two vertex which are maximum distance apart?
3) What is the minimum number of coins of giver denomination required to make a sum of N? see this
4) Number of possible configurations of a rubic's cube?
No comments:
Post a Comment