_Beginner 2 Computer Science
Saturday, 16 June 2018
Tuesday, 1 May 2018
Sunday, 1 October 2017
How to check Palindrome
Check if a string is palindrome or not is one of most common question we encountered during our basic days.
Let's Solve this problem with a Naive but efficient approach in this case.
Pseudocode :
- i=0, j=n
- while i < j:
- check if i'th element is not equal to j'th
- then return False
- else i++,j--
- loop end
- return True
Subscribe to:
Posts (Atom)