on Wednesday 1 April 2020
The numbers in this puzzle follow the below pattern:

       result = num*6 + 6 or (num+1) * 6.

For example
3*6 + 6 = 24

Hence for 9 the result will be 9*6 + 6 = 60.
So correct answer is 60.
In the below pattern guess the missing number


                                           12  78
                                            5   36
                                            3   24
                                            9    ?

Click here for the solution   

                                         
on Tuesday 31 March 2020
The pattern is a bit tricky but easy to crack.
Missing number will be 4

The pattern followed is that the sum of two numbers is used to create the upper row.
Example
9+8 = 17 so last digit is 7.
next 8+6 = 14 . Here last digit is 4 and so on.

Hence the correct solution will be 4.
In the below pattern guess the missing number


                                                            ?
                                                        1     3
                                                     7    4     9
                                                  9    8     6    3


Click here for the solution  
on Saturday 28 March 2020
We can pay the worker by doing 2 cuts in the chain.
Cut should be such that it divides the chain in the ratio of 4:2:1.
Let us say these pieces are 4x,2x and 1x.
For example - Let us say the chain length is 7 cm. Then make 2 cuts and get 3 pieces of the chain i.e 4 cm,2 cm and 1 cm.

Now the salary will be given to worker as :

Day 1 - Give him 1x cut.
Day 2 - Give him 2x cut and take back 1x cut.
Day 3 - Give him 1x cut.
Day 4 - Give him 4x cut and take back 1x and 2x cut.
Day 5 - Give him 1x cut.
Day 6 - Give him 2x cut and take back 1x cut.
Day 7 - Give him 1x cut.

This way we can pay the worker for 7 days.
You have a metallic chain which has to be paid to a worker for working for 7 days.
You can cut the chain and can pay the worker each day for the work done.
What is the minimum number of cuts required in the chain for paying the worker.

Click here for the solution.

on Wednesday 25 March 2020

We can deduce the rotation of the disc with 2 sensors by placing them at an angle of 90 degree.
Let us say we have 2 sensors named A and B.

Now there are two possible initial values of the sensor. Either Black or White.
Let us assume that Black - 0 and White - 1

The disc is rotating clockwise if Sensor A changes to the value of Sensor B and Sensor B becomes Sensor A XOR 1

The disc is rotating counter clockwise if Sensor A changes to the value of Sensor B XOR 1 and Sensor B becomes Sensor A.

This is explained with the below table.



Initial Clockwise Counter-Clockwise
A - Black B - Black A - Black B - White A - White B - Black
A - Black B - White A - White B - White A - Black B - Black
A - White B - Black A - Black B - Black A - White B - White
A - White B - White A - White B - Black A - Black B - White
You are given a disc.
One half of the disc is painted black and other half of the disc is white.
You are provided with camera sensors which can predict the color of the disc.
Sensors will indicate the color of the disc.
Find the minimum number of sensors required for to find the direction of the moving disc.



Click here for the solution.
on Wednesday 12 February 2020
To determine whether a 32 bit number is even or odd we need to check the LSB of that number.
If least significant bit of the number is 0 then it is even otherwise it is odd.

So in the incoming 32 bit numbers we just have to check the Least significant bit of the number and we should be able to check the same.

This is the most optimal solution in terms of hardware design or software compilation.
A sequence of 32 bit numbers arrive in order. Design a logic to check for even and odd numbers in this sequence and let the user know the same.
Logic should be most optimal and should work in every case.

Click here for the solution.