3 Mislabeled Boxes Puzzle (Interview Puzzle)

10 months ago codedestine 0
3 Mislabeled Boxes Puzzle :- You have given 3 boxes, One contains the red color ball, another contains the blue color ball and the third one contains the green color ball. All boxes are mislabeled, which means blue label box does not contain the blue color ball, red label box does not contain the red Read More

Heaven or Hell Puzzle (Interview Puzzle)

10 months ago codedestine 0
Heaven or Hell Puzzle :- You are standing before two doors. One leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who Read More

Bridge Crossing Puzzle (Interview Puzzle)

10 months ago codedestine 0
Bridge Crossing Puzzle :- Four people need to cross a rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for 17 minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people Read More

3 Ants and Triangle Puzzle (Interview Puzzle)

10 months ago codedestine 0
3 Ants and Triangle Puzzle :- There are 3 ants sitting at the three different corners of an equilateral triangle. Now each ant randomly picks a direction and starts moving along the edge of the triangle. What is the probability that none of the ants collide with each other? Now try to solve this on Read More

Rope Puzzle (Interview Puzzle)

10 months ago codedestine 0
Rope Puzzle :- You have given two ropes of varying thickness both are of different density, different width, and different length. Each rope burns in 60 minutes. You have to measure 45 minutes using only these two ropes. Note that you can not cut one rope in half because the ropes are non-homogeneous and you Read More

9 Balls Puzzle (Interview Puzzle)

10 months ago codedestine 0
9 Balls Puzzle :- You have given a two-arm balance scale and 9 identical looking balls. One of the ball is of different weight(heavier/lighter) than rest of the 8 balls, which all are of equal weight. You have to find out the different weight(heavier/lighter) ball and identify whether the ball is heavier or lighter by Read More

8 Balls Weight Puzzle (Interview Puzzle)

10 months ago codedestine 0
8 Balls Weight Puzzle :- You have given a two-arm balance scale and 8 identical looking balls. One of the ball is heavier than rest of the 7 balls, which all are of equal weight. You have to find out the heavier ball by using two arm balance scale a minimum number of times. Now Read More

Flyweight Design Pattern

11 months ago codedestine 0
According to GoF (Gang of Four), flyweight design pattern intent is: “Use sharing to support large numbers of fine-grained objects efficiently” Flyweight design pattern is used when a program need to create huge (usually in thousands or in millions) number of objects of a Class that share (similar) some state among them. By using this design Read More