ZestMoney Interview Question: Given a number as an input we... | Glassdoor

Interview Question

Software Development Interview

Given a number as an input we have to make it equal to

  1 using some operations in the minimum possible steps. The operations allowed are addition by 1, subtraction by 1 and division by 2.

Interview Answer

1 Answer


This was a very basic recursive solution for that which could also have been done using dynamic programming.

Interview Candidate on Jul 1, 2019

Add Answers or Comments

To comment on this, Sign In or Sign Up.