This post content:- Algorithm Flowchart C code Output Pdf notes Algorithm:- Step 1:- start. Step 2:- declare string. Step 3:- Find length of str. Let length be n. Step 4:- Initialize low and high indexes as 0 and n-1 respectively. Step 5:- Do following while low index ‘l’ is smaller than high index ‘h’. a) If str[l] is not same as str[h], then return false. b) Increment l and decrement h, i.e., do l++ and h–. Step 6:- If we reach here, it means we didn’t find a mis Step 7:- print string is a palindrome. Step 8:- end. Flowchart:- C code:- Output:- Try it yourself:- Online c compiler Download pdf notes
Comments
Post a Comment