Skip to main content
Loading page content
Explore
Learnings
Mental Math
Dashboard
More
Algo
Flow
Visualizers
Learnings
Quizzes
Mental Math
Dashboard
Log in
Sign up
Loading quiz challenge
Back to Visualizer
Question 1 of 5
Searching
• Naive Pattern Search
What is the worst-case time complexity of the naive (brute-force) pattern search algorithm for a text of length n and pattern of length m?
A
O(n + m)
B
O(n * m)
C
O(log(n*m))
D
O(n)