For instance, ABBA is a palindrome, but ABCBB is not. You are given a string s. Return the length of the longest substring of s that is a palindrome..program in c++
I strongly suggest that you have a go at doing your own homework as per the community rules:
If you have trouble finding it, under the "Keep It Organized" section is this rule:
Do provide evidence of having done some work yourself if posting questions from school or work assignments.
Your post above displays no evidence that you have tried to do any of your homework. The community here will not do your homework for you, or spoon-feed you code. We will only help you when you get stuck with something specific.
Start writing your program. If you hit upon any problems that you cannot solve, post the code that you have so far and describe the problems/errors you are experiencing and someone here will help you!
Remember: The amount of effort that you put into your posts will determine the amount of effort that others will put in to help you!
Explore reversing of a string.
consider iterating through the string for the various substrings, working from biggest substring to smallest, doing it in this order you find the biggest one first and then you have found it. With each substring, reverse it and compare. if the string is 8 characters long, flip it check it, if it fails, reduce it to 7, get the substring at (0,7) flip it, check it, if it fails try the substring at (1,7) if it fails then try 6, which will require checks of (0,6),(1,6),(2,6) etc on down.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...