← Strings Quiz: all 8 questions
Strings Quiz · Question 6 of 8
What is the longest palindromic substring of "babad"? (either correct answer is accepted)
What is the longest palindromic substring of "babad"? (either correct answer is accepted)
Answer & explanation
Correct answer: bab
Both "bab" and "aba" have length 3; no longer palindrome exists in "babad".
Can you get the rest right without peeking?
Take the timed Strings Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →