understanding big o notation - Search