Brute Force: Linear Search

This is the most simple searching algorithm and it is in O(n)O(n) time. In fact, give it a shot. You’ll probably be able to come up with it yourself!

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.