Podcast
Questions and Answers
What is the time complexity of linear search algorithm?
What is the time complexity of linear search algorithm?
- O(log N)
- O(N) (correct)
- O(1)
- O(N^2)
What is the auxiliary space complexity of iterative implementation of linear search algorithm?
What is the auxiliary space complexity of iterative implementation of linear search algorithm?
- O(log N)
- O(N^2)
- O(N)
- O(1) (correct)
What is the advantage of linear search algorithm?
What is the advantage of linear search algorithm?
- It is the fastest algorithm for searching elements in an array
- It is a simple and flexible algorithm (correct)
- It has a time complexity of O(log N)
- It works well for large data sets