Lesson 24 of 34
Characters এবং ASCII
9 min 30 XP
প্রতিটি char-এর একটি সংখ্যা আছে (তার ASCII/Unicode code): 'A' = 65, 'a' = 97, '0' = 48। তাই chars দিয়ে অঙ্ক করা যায়: 'a' + 1 হলো 'b'।
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.26 size-এর int array দিয়ে অক্ষরের frequency গুনুন: count[ch - 'a']++। এই কৌশল anagram ও first-non-repeating-character প্রশ্নের সমাধান করে।
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.