string to palindrome, C/C++ Programming

Assignment Help:


A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindromes with minimum number of character replacements.

Input Format:

First line starts with T, which is the number of test cases. Each test case contains a string (S).

Output Format:

For each test case print the minimum number of character replacements needed to convert the given string to palindrome.

Constraints:

1<=T<=100

1<=|S|<=60, S will contains only lower case alphabets (''a''-''z'')

Sample Input and Output

SNo. Input Output
1
2
saarj
saaaa


2
1

Related Discussions:- string to palindrome

A client and a server for an instant messaging system based , Develop a cli...

Develop a client and a server for an instant messaging system based on UDP and IPv4

Programming an odds betting website, Programming an odds betting website ...

Programming an odds betting website Project Description: We want someone to program a odds betting website, Require someone with experience and skills! Skills required are

Calculate and display the marks and grade for each student, In this assignm...

In this assignment you are required to develop a program that allows the creation, viewing and storage of information about ITECH7603 Students. In order to complete the task you ha

Define a structure in c++, Define a structure in C++: Write a program ...

Define a structure in C++: Write a program a structure in c++ program. void main() {                 struct player                 {                 char name[2

Define a procedure called make-avl-tree, This question deals with AVL trees...

This question deals with AVL trees. The representation to be used is similar to the bank account object discussed in class. (a) Define a procedure called make-avl-tree which mak

Time table, programme for time table in c++

programme for time table in c++

Define external storage class - computer programming, Define External Stora...

Define External Storage Class - computer programming? When a variable is declared outside a function the storage is permanently assigned to it and its storage class is 'extern'

Define encapsulation?, A:  it is containing and hiding Information regardin...

A:  it is containing and hiding Information regarding an object, like internal data structures and code. It isolates the internal complication of an object's operation from the res

Sentinel controlled loop, develop an algorithm using pseudocode for computi...

develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx

Compiling/ installing openvpn client within an ip camera, Project Descripti...

Project Description: I want someone with experience on adding/compiling/installing the OpenVPN client software within an IP network camera's embedded operating system. Either if

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd