1 / 3
Sep 2022

Can anyone share some test cases for EXCHNG? I keep getting Wrong Answer, even though I made a test case generator and my code always gives the same result as a naive solution. This tells me that maybe my naive solution is wrong.

  • created

    Sep '22
  • last reply

    Oct '22
  • 2

    replies

  • 672

    views

  • 2

    users

OK, I figured out what I did wrong. My solution gets even some very trivial cases wrong such as:

Input:

1
2 0

Expected output:

2

I didn’t account for the fact that whatever instructions we add to the end could also themselves be removed.

1 month later

during this check, I get an error, maybe I don’t understand how to do this, can you please explain the newcomer