Added solution for the Hoare crap