Separate the Numbers

  • + 0 comments

    I spent like 10 hours trying to do this the hard way. When I figured out the easy way I did it in 5 minutes during a business meeting. Do yourself a favor:

    For input "99100", grab the first digit 9 and build beautiful string 91011, and check whether it's identical to 99100, It's not. So grab the first 2 digits 99 and build beautiful string 99100. It's identical, so "YES 99".

    Don't try to stairstep a left index and a right index or dynamically keep track of curernt index length or anything. Save it for the harder questions lmao.