Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help to answer this queations in C please The longest palindromic substring is the problem of finding a maximum-length contiguous substring of a given

Need help to answer this queations in C please

image text in transcribed

image text in transcribed

The longest palindromic substring is the problem of finding a maximum-length contiguous substring of a given string that is also a palindrome. For example, the longest palindromic substring of "bananas" is "anana". The longest palindromic substring is not guaranteed to be unique; for example, in the string "abracadabra", there is no palindromic substring with length greater than three, but there are two palindromic substrings with length three, namely, "aca" and "ada" Write an efficient function that takes as its input a string (or an array of characters) and find the longest substring which is palindrome. You may assume the array is non-NULL and non-empty (i.e., it contains at least one element). Credit for this problem will be based in part on how efficient your solution is (in terms of big-oh runtime). Do not use recursion. Hint: You can use dynamic programming to efficiently implement your function. The function signature is: int longestRalSubstx(char *str)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

Students also viewed these Databases questions

Question

What is the purpose of an internal standard in ICPMS?

Answered: 1 week ago

Question

14-18 Compare the two major types of planning and control tools.

Answered: 1 week ago