Lesson 17 of 23

String-এর সমস্যা: Reverse, Palindrome, Frequency

11 min 30 XP

Interview-এ strrev-এর মতো library helper ছাড়া string কোড লিখতে বলা হয়। দুটি কৌশলে বেশিরভাগ প্রশ্ন মেটে: দুই প্রান্ত থেকে 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.