These are two solutions for uva 784 — maze exploration problem : https://paste.ubuntu.com/26433633/
https://paste.ubuntu.com/26433634/
the first one gets accepted but the second one does not although they are almost identical ? can anyone help with the explanation