← 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?
- A.O(n)
- B.O(n log n)
- C.O(n³)
- 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 →