proving big o notation - Search