Your job is to measure 45 minutes if you have only two cords and matches to light the cords.
1. The two cords are twisted from various materials, so their different segments can burn at different rates.
2. Each cord burns from end to end in exactly one hour.
The interviewer has given me 100 marbles(50 white and 50 black) and two empty boxes.
He then told me that he will leave the room and i need to place all the marbles in two boxes.
And When he come back, he will draw a marble from any of the two box and if the marble is white I will be hired.
Also
* No box can be empty.
* All 100 marbles must be placed in one of the two boxes.