List elements (negative indexes) Tests Failing

I’m stuck on Stage #ri1: List elements (negative indexes)

When I test RPUSH locally, I seem to be getting the correct output, but for some reason when the tests are run, sometimes it says Received: “” (no content received). I’m not sure why my local environment never does this but the test does.

Hey @NIHARSIMHADRI, I noticed a couple of issues:

  1. #define MAX_TOKENS 8 may not be big enough for a long command:

  1. The order here could cause problems if curr_list is not valid:

Thanks Andy, fixing these helped make it work.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.