🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: CFG and PDA: all 10 questions

Quiz: CFG and PDA · Question 5 of 10

What is the time complexity of the CYK algorithm for a string of length n?

What is the time complexity of the CYK algorithm for a string of length n?

  1. A.O(n)
  2. B.O(n log n)
  3. C.O(n³)
  4. D.O(2^n)
Answer & explanation

Correct answer: O(n³)

It fills an n × n table, trying every split point for each cell.

Can you get the rest right without peeking?

Take the timed Quiz: CFG and PDA quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →