added information on time complexity