Palindrome of string without using Reverse function?

Hey @BlackCurrant

Create a new boolean variable as bol_Palindrome with default value as True

Remove the WriteLine activity in the Then block

Then just replace the WriteLine activity with Assign activity in the Else block, with the below statement

bol_Palindrome = False

Add a Break activity below the above Assign

After the For-Each completion, just add a Log message with below statement,

strVal + if(bol_Palindrome, " is a Palindrome", " is not a Palindrome")

Hope this helps

Thanks
#nK

1 Like