Hi everyone ! I did 100% on this puzzle but I switch to bash to get the bonus... This is horrible...
I can't get green on the last test because my solution is not optymised enough, however i did the same algorithm as in python :/
Here is what i do in bash:
For i < N
I add it in tab in a way that tab is sorted in ascending order, to do that I do a dichotomic path
I check the difference with this value and the one before, if it's 0, i break the for loop
If i didn't find a difference equals to 0, I loop over tab with i and j = i+1 and calcul the difference for each value
And then i print the smallest difference but it takes too much time in bash, can you please give me some help ?