You are viewing a single comment's thread. Return to all comments →
using the concept of XOR
#!/bin/bash read a read -a arr count="${#arr[@]}" ans="${arr[0]}" for((i=1;i<count;i++));do (( ans= ans ^ "${arr[i]}" )) done echo "$ans"
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer - Bash!
You are viewing a single comment's thread. Return to all comments →
using the concept of XOR