Question

What is the time complexity of the KMP algorithm for searching a pattern of length 'M' in a text of length 'N'?

A O(MN)
B O(N log M)
C O(N + M)
D O(M^2)
E O(N^2)
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)