Good job! Have you tried recursion version of binary search?
Yeah, data must be sorted, so if you don't know the data you will have to sort it anyway yourself which get it down to O(n log n). So simple linear search would be good enough then.
Software Engineering bootcamp graduate currently seeking work. Previously a senior manufacturing specialist with over 4 years in the Biotechnology industry.
Good job! Have you tried recursion version of binary search?
Yeah, data must be sorted, so if you don't know the data you will have to sort it anyway yourself which get it down to O(n log n). So simple linear search would be good enough then.
Thanks for reading Tomasz! No I haven't tried implementing the recursive version yet, but I will definitely try it out. Thank you for the feedback!