Not sure how to proceed here with min stops for gas

For line 34's function, stops, I tried to see if I needed to call functions
for minimum gas or find the last index but I couldn't seem to obtain anything from doing so, not sure where what to do.

summary: https://pastebin.com/BfhHa6W9

test cases: https://pastebin.com/iEBkMqNc

code: https://pastebin.com/tN4AZXri
Topic archived. No new replies allowed.