Friday, October 23, 2015

Mind Refreshing Puzzle - A boy goes to his grand parents house.


Mind Refreshing Puzzle - A boy goes to his grand parents house.

A boy goes to his grand parents house. There he either does   yoga in the morning / plays tennis in the evening / does neither. 


However he does not do both on the same day. 

We know that 22 days he did either 1 activity. 

24 mornings he did nothing. 

12 evenings he did nothing. 

How many min days did he stay there to have done this? 



Answer

We get three equations: 

1. Yoga + Tennis =22 
2. Tennis + Nothing=24 
3. Yoga + Nothing = 12 

We are able to conclude: Yoga = 5, Tennis = 17, Nothing =7. 

Hence the min days: 5+17+7=29 days

Wednesday, April 22, 2015

Git - Delete a branch from local OR remote


Delete a branch from local OR remote


To remove a local branch from your machine:
git branch -d the_local_branch
To remove a remote branch from the server:
git push origin :the_remote_branch