Invert logic for buchet search