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

Strings Quiz · Question 8 of 8

What is the longest common prefix of ["flower", "flow", "flight"]?

What is the longest common prefix of ["flower", "flow", "flight"]?

Answer & explanation

Correct answer: fl

All three start with "fl"; the third character differs ("o" vs "i").

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 →