# A palindrome is a nonempty string over some alphabet that reads the same forward and backward. Examples

## Question:

A palindrome is a nonempty string over some alphabet that reads the same forward and backward. Examples of palindromes are all strings of length 1, civic, racecar, and aibohphobia (fear of palindromes).

Give an efficient algorithm to find the longest palindrome that is a sub sequence of a given input string. For example, given the input character, your algorithm should return carac. What is the running time of your algorithm?

Fantastic news! We've located the answer you've been seeking!

## Step by Step Answer:

**Related Book For**

## Introduction to Algorithms

**ISBN:** 978-0262033848

3rd edition

**Authors:** Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest