Puzzles for Software Engineers | Microsoft #2

preview_player
Показать описание
#shorts
Are you worried about placements/internships? Want to prepare for companies like Microsoft, Amazon & Google? Join ALPHA.
In case the website crashes due to your heavy response then use this second link.

------------------------
-------------------------

Рекомендации по теме
Комментарии
Автор

Firstly divide the balls in grp of the three balls each .=3 grp 3 balls each

1. Now place them on weight machine if one of the sides has less weight then it goes down take the grp out or

If they are equal then take the third grp out

2. Now we have only 3 balls left measure
2 balls on weight machine if one ball has less weight then it goes down then you have the answer or
if they are equal then third ball is the light weight ball

Thank you 💗

lucifergaming
Автор

Divide the balls into sets of 3. Weigh 2 of the sets, if the weight is equal the lighter ball is in the 3rd set. Else it will be in the set that weighs less. Choose the lighter set and select any 2 balls from the set. If those 2 are equal in weight then the 3rd one is the lighter one else the one that weighs less is the lighter one.

monu-piol
Автор

we can divide the balls into 3 groups of 3 each, then compare any 2 of the groups... if any one of them is having less weight, that will be the required triplet to proceed further. Otherwise if they are equal, then we have to proceed with the left 3 balls as triplet. After finding the required triplet, we choose any 2 balls from the triplet... and compare them... now if the balls are having same weight then the answer is the third ball... otherwise answer will be the ball with less weight after comparing Really good question

adarshsingh
Автор

First
Take 3 balls and place them on one end

Second
Take 3 balls and place them on the other end

Case 1- If the weight measure levels itself
It means that the balls which we took initially are all equal weight and one of the 3 balls left( which we didn't take ) is lighter than the others, so, discard the 6 balls which we took initially and,
We take any two balls and place them on the weight measure( on opposite ends of course).
If one of the sides rises, that is the lighter ball.
If the weight measure again levels itself, then the 1 left ball is the lighter one.

Case 2- If one of the weight measure sides rises( when we initially took 3 and 3 balls).
It means that one of the 3 balls( whose side rose) is lighter than the others. Take those 3 balls and discard the remaining.
Take any 2 out of these 3 and put them on weight measure.
If one side rises, then that is the lighter ball
If the weight measure again balances out itself
Then the remaining one is the lighter ball.☺️

aarushdwivedi
Автор

First divide balls in 3unit balls in 3 set.
1St scaling > Placing 2 sets of ball at scaling device. if there are equal last sets have lighter ball. *Scale any two in the device. If any of them are lighter you can see there. If both are equal unscaled ball is lighter.
2nd> if you see, first 2 sets of balls not equal, take lighter sets and repeat the process from * from upper paragraph.

manasapkota
Автор

Solved it😎😎

First Attempt: 3 vs 3
If one side is Heavy, then Again 1 vs 1, and find out.

If both are same then,
Second Attempt take 2 out of remaining 3 and place 1 on both side.
If same again, then the 3rd remaining one, otherwise the heavy side one.

atharvagrawal
Автор

Someone's inner voice-"Heavier balls bounce higher than lighter balls, "

pranjalgogoi
Автор

I love the way you guys simplify the things and explain things in effective manner.... I love you guys....

otbuyer
Автор

Step 1.. divide the 9 balls 3[1st set] - 3[2nd set] - 3[3rd set]
Step 2 .. now insert the first set and the second set into the weighing scale...

Case1:
weigh both 1st and 2nd set of balls
- If both weigh same then the lighter ball is in the 3rd set

Now in the 3rd set of balls.. pick any 2 random and weigh them..

If both weigh same then the remaining ball is the lighter one.

If one weighs less then that is the lighter ball..

santoshkumar-ucef
Автор

First weight 6 balls by keeping 3-3 on both sides and
Case 1 => if it equals then weight 1-1 balls both sides, then if equals then other ball will be lighter . If it unequals then one of the ball is lighter
Case 2 => If it unequals then weight the two balls of lighter side and if it equals then 3rd is lighter ball and if it un equals then we got lighter ball

tiwariji.
Автор

Select 6 balls randomly from set of 9 balls, Now divide those 6 balls into half i.e. put 3 balls on each side of weighing scale. Now there are 3 cases possible:

Case 1) : Balanced
It means all 6 balls have same weight. So the lighter ball will be in remaining 3. Now select 2 balls randomly out of those 3 and put it on scale. If any one of them is lighter then the scale will let us know else the last remaining ball is lighter.

Case 2) Unbalanced on either of two sides :
It means that the side which is more elevated contains lighter ball. So now discard remaining 6 balls. And concentrate on those 3 balls which where present on elevated side of scale. Repeat the same procedure done in case 1 to find the lighter one.

abhijitzende
Автор

1- we make groups of 3
2- compare any two groups
3- find out the odd one in these 3 groups
4- remove one ball from the odd group
5- compare the remaining one.

hiddenexperiments
Автор

Saying-Halke weight wali ball
Subtitle-Heavier ball

gurungdarshan
Автор

Divide 9 balls in group of 3 each
1. Wheigh any 2 grps i.e. 1 grp= 3 balls
If there any of the grps wheigh less, then the ball is inside that grp, will discard all the other grps and wheigh any 2 balls of the selected grp and will be able to find the ball.
Else will select the 3rd grp of ball and wheigh any 2 balls and find the ball accordingly.

RahulGupta-lyuu
Автор

Unique solution
4 and 4 then if both are equal means left if target neither. Assume lower part as result sample. In left side Put one left and one of result sample and in right side put 2 from result sample. If left is equal means left ball in result sample is lighter. Else if left is lower then 2nd ball is target. Else right is lower then bounce both one by one which ball bounce lower that is target

radhesaini
Автор

Simple 4 balls ko ek side (left) aur 4 balls ko dusri side(right) agar dono ka weight equal h toh jo last ball bahar bachi wahi light weight h lekin agar difference aa raha h dono side mein toh mai heavier sides (alternate sides) se balls uthate jaungi jab tak weight equal nhi hota aur jb weight equal hojaye toh jo last time (weight equal hone se pehle) ball maine uthayi h wohi light weight ball h 😜

firdoshchaudhary
Автор

Select any 6
3 - 3 configuration
if same, proceed with remaining two.
if not same, select any two from the lighter bunch and solve it.

arjunkaralkar
Автор

Firstly balance 6 balls 3 balls on each side of weighing machine
if they are unequal take the lighter side (i.e 3 balls) and out of those three now take any two if they are equal then 3rd one is lighter
Otherwise one of them will lighter
If they are equal then take the other left out last 3 balls
And weigh any two of them if they are equal last ball is lighter otherwise one of them

Tricky yet an easy one😊

manvisinghal
Автор

So, first we make 3 group of ball with 3 ball in each group. Now, select any 2 group and keep it on scale. Now, there is two possibilities :
1) if the scale is in balance position that mean our two set that we have selected have equal weight of ball and the set we left out contain lighter ball.
Or if the scale is in unbalance position then the scale with higher position contain lighter ball.
Either, of two case we select the group which contain lighter ball.
Now, take two ball from that group and put on each one on both sides of scale if scale is in balance position then the ball we left out is lighter one or if scale is in unbalance position then ball with higher position is lighter ball.

adarshgupta
Автор

Will divide into 3 groups each with three balls... Now take 2 groups on both sides. .
Case1-if both weighs the same then take the remaining 3rd group.. And place 1 ball in each side then if both weighs the same then the remaining is the lighter one. . Or else the lighter ball will get up automatically..
Case2-if one side weighs less.. Then the lighter ball is in that group of three balls.. hence can be found in the similer way ..

akashmahanty