For input "cbbd", what should be returned?

Practice this question from Longest Palindromic Substring - Expand around center Pattern Practice Quiz, with options and an explanation.

Question

For input "cbbd", what should be returned?

Option A

c

Option B — Correct answer

bb

Option C

cbbd

Option D

bd

Explanation

The longest palindromic substring is "bb".

Longest Palindromic Substring - Expand around center Pattern Practice Quiz

All questions · Previous question

Open on QuizMaker