Adobe | MTS | 16 November

Adobe · Question · Posted Apr 2020

You need to buy cupcakes as you visit from one shop to another.You can either buy a cupcake, sell a cupcake or do nothing. You will be visiting Y shops.And initially you have X cupcakes.At the end of the journey you should have Z cupcakes.Input is three numbers X, Y, Z.You need to output the maximum number of cupcakes that one can have in the journey.

The full answer & interview discussion are available to premium members.

Log in Create a free account