Tcs Coding Questions 2021 [best] -

The coding section is usually divided into two parts based on the targeted role (Ninja or Digital/Prime): Great Learning Foundation Coding:

This was a "modified greedy" problem that required recursion or DP. Tcs Coding Questions 2021

M = 18. Standard greedy uses 10+5+3 = 3 coins. But 18-10=8, and 8 is not divisible by 3, so allowed. If M=20, standard: 10+10 =2 coins, but after first 10, remainder=10 (not divisible by 3) → allowed. If M=15, standard: 10+5=2 coins, but remainder after 10 is 5 (not div by 3) → allowed. Actually this twist made it tricky. The coding section is usually divided into two