I am trying String Manipulation programs, and I am really stuck in this where we need to write a program whether a string is a palindrome or not without using reverse. Run a loop from starting to length/2 and check the first character to the last character of the string and second to second last one and so on …. If any character mismatches, the string wouldn’t be a palindrome —> this is the logic, however in UiPath I’m not able to write the piece of code how Subsrting or IndexOf & Length activities might be used to iterate.
In this case, b mean boolean type variable which is output by previous method : Select.
And i means index number of iteration of Select method.
These are anonymous function of LINQ. Please see the following document in details.
That’s is good…but the main problem is whole string should give me the output of palindrome.
Not a particular character.
Although due to the For Each loop it’s comparing all the characters in the string.
But the resultant output should be
“madam” —> is palindrome
“geek” —> not a palindrome
just like how we do it in other programming language.