Lesson 17 of 23
String Problems: Reverse, Palindrome, FrequencyString Problems: Reverse, Palindrome, Frequency
11 min 30 XP
Interview-ல் strrev போன்ற library functions இல்லாமல் எழுதச் சொல்வார்கள். இரண்டு முனைகளிலிருந்து swap (two pointers) மற்றும் 26 அளவுள்ள count array ஆகிய இரண்டு tricks போதும்.
Interviews ask you to write string code without library helpers like strrev. Two tricks cover most questions: swapping from both ends (two pointers) and a count array of size 26.
Example: edit me and press Run
Press Run to see the result here.