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.