We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I have run this against all of the test cases with the successful expected output. However when I submit it only #1 & #2 are correct ... but #3 is wrong. What am I missing?
read one
read -r -a two
flag=1for((i=0; i<$one; i++ ))dotemp=${two[$i]}[${two[$((temp-1))]} -ne $((i+1))]&&flag=0done[$flag -eq 1]&&echo"YES"||echo"NO"
Security Involution
You are viewing a single comment's thread. Return to all comments →
Bash question:
I have run this against all of the test cases with the successful expected output. However when I submit it only #1 & #2 are correct ... but #3 is wrong. What am I missing?
Please help!