worst case and best time complexity - Search