We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

As others have also explained very well. It would be easy if we do it other way that is using Reduction.
Min(Elements) is 1. So min-1 and min-0 are 1 and 0.
Considering two cases:
i) Reducing it to 1:
1 --> 1 = 0 oper, 5 --> 1 = 2 oper and 5 --> 1 = 2 oper. Hence total 4 operations are required.
ii) Reducing it to 0:
1 --> 0 = 1 oper, 5 --> 0 = 1 oper and 5 --> 0 = 1 oper. total 3 operations are required.

Therefore min(4,3) we choose reducing it to 0 instead of 1. So answer is 3.

By the way, if you do it by Increasing, still 3 operations required, just follow this:
1- 1,5+1,5+1 -- 1,6,6
2- 1+5,6,6+5 -- 6,6,11
3- 6+5,6+5,11 -- 11,11,11

## Equal

You are viewing a single comment's thread. Return to all comments →

please help me someone. why for input .

As others have also explained very well. It would be easy if we do it other way that is using Reduction. Min(Elements) is 1. So min-1 and min-0 are 1 and 0. Considering two cases: i) Reducing it to 1: 1 --> 1 = 0 oper, 5 --> 1 = 2 oper and 5 --> 1 = 2 oper. Hence total 4 operations are required. ii) Reducing it to 0: 1 --> 0 = 1 oper, 5 --> 0 = 1 oper and 5 --> 0 = 1 oper. total 3 operations are required.

Therefore min(4,3) we choose reducing it to 0 instead of 1. So answer is 3.

By the way, if you do it by Increasing, still 3 operations required, just follow this: 1- 1,5+1,5+1 -- 1,6,6 2- 1+5,6,6+5 -- 6,6,11 3- 6+5,6+5,11 -- 11,11,11

Thank you i got it..

1 (5) 5 ->adding 5

6 5 (10) ->adding 5

(11) 10 10 ->adding 1

11 11 11

The answer is 3 only.