Interview question of the issue #341 of rendezvous with cassidoo.
Given a number and a digit to remove from that number, maximize the resulting number after the digit has been removed and print it. You can choose how you want to handle a digit not existing in the number.
Example:
> removeDigit(31415926, 1)
> 3415926 // we picked the second 1 in the number.
> removeDigit(1231, 1)
> 231 // 231 > 123
Just pnpm i
to install all dependencies and then pnpm t
to run the tests!