HackWithInfy 2021 Sample Question-A (Beautiful Function) Solution
Problem Statement: Let’s define a Beautiful Function F(x) in such a way: Add 1 to the value of x, if the result of addition contains any trailing zeros then remove them all. Example:F(11) = 12F(19) = 2 (20 –> 2)F(99) = 1(100 –> 10 –> 1) Let’s define a number to be reachable from x , […]
HackWithInfy 2021 Sample Question-A (Beautiful Function) Solution Read More »