Write a function in pseudocode that determines if a given string is a palindrome

Declare and Initiate a new empty stringTraverse the given string using a loopTake each char from the given string and concatenate it to the beginning of the new stringCompare the final new string with the given string
This could look like:String str;for each char in str;{str = char + str;}if str == given then true else false;

CV

Related Computing A Level answers

All answers ▸

Write pseudocode for the binary search algorithm and state, with an explanation, it's worst case complexity in big-O notation


Describe the difference between a CPU and a GPU with relation to processing power and ability to perform tasks.


What is the difference between compile-time errors and runtime errors?


Write pseudocode for the linear search algorithm, and then explain it’s complexity using big-O notation