Lesson 17 of 23

String Problems: Reverse, Palindrome, Frequency

11 min 30 XP

Interview-ல் strrev போன்ற library functions இல்லாமல் எழுதச் சொல்வார்கள். இரண்டு முனைகளிலிருந்து swap (two pointers) மற்றும் 26 அளவுள்ள count array ஆகிய இரண்டு tricks போதும்.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

Challenge

+30 XP

small letters சொல் ஒன்றைப் படித்து (scanf("%s")), அதில் அதிக முறை வரும் எழுத்தையும் எண்ணிக்கையையும் print செய்யுங்கள். சமநிலை என்றால் அகர வரிசையில் முதலில் வருவது. Input: banana → Output: a 3

Output Loading C (first time takes a few seconds)
Press Run to see the result here.