Lesson 17 of 23

String సమస్యలు: Reverse, Palindrome, Frequency

11 min 30 XP

Interviews లో strrev వంటి library helpers లేకుండా string కోడ్ రాయమంటారు. రెండు tricks చాలా ప్రశ్నలకు సరిపోతాయి: రెండు చివరల నుండి swap (two pointers), 26 size count array.

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

scanf("%s") తో ఒక lowercase పదాన్ని చదివి, ఎక్కువసార్లు వచ్చే అక్షరం, దాని లెక్క print చేయండి. సమానమైతే అక్షరక్రమంలో ముందున్నదాన్ని print చేయండి. Input: banana → Output: a 3

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