connecting two common ground on the breadboard to one on arduino?

Even without connecting common ground it worked and i am wondering how this circuit worked!!!Having problem in it....