Back to Browse

Strings in Java – Complete Guide with Important Practice Problems | DAY 12 of Learning DSA

8 views
May 4, 2026
58:54

In this video, you will learn the fundamentals of **Strings in Java**, one of the most important concepts for building real-world applications and solving coding problems. This tutorial is designed for beginners and intermediate learners who want to understand string operations and improve their problem-solving skills. 📌 Topics covered: * Introduction to Strings in Java * String methods and operations * Character handling and ASCII values * String transformations * Practical problem-solving --- ## 🧠 Problems Solved in This Video ### 1️⃣ Length of Multiple Strings Input T strings and print their lengths. **Example Input:** ```id="s1" 3 alpha code java ``` **Output:** ```id="s2" 5 4 4 ``` --- ### 2️⃣ Maximum Character Type Count Given a string, count whether **alphabets or digits** occur more. **Example Input:** ```id="s3" ab12cd345 ``` **Output:** ```id="s4" Digits: 5 Alphabets: 4 ``` --- ### 3️⃣ Leftmost ASCII Character Occurrence Find first occurrence of a character using ASCII code. **Example Input:** ```id="s5" String: developer ASCII: 101 ``` **Output:** ```id="s6" Index: 1 ``` --- ### 4️⃣ Rightmost ASCII Character Occurrence Find last occurrence of character using ASCII. **Example Input:** ```id="s7" String: engineer ASCII: 101 ``` **Output:** ```id="s8" Index: 6 ``` --- ### 5️⃣ Convert to Uppercase Convert a lowercase string to uppercase. **Example Input:** ```id="s9" coding ``` **Output:** ```id="s10" CODING ``` --- ### 6️⃣ Magical String Reduction Problem String contains only **p, a, m**. Remove pairs: * (p, m) OR (a, m) Check if string can become empty. **Example Input:** ```id="s11" pamapm ``` **Output:** ```id="s12" 1 ``` --- ### 7️⃣ Insert Alphabet Index After Each Character Add position of each character. **Example Input:** ```id="s13" cat ``` **Output:** ```id="s14" c3a1t20 ``` --- ### 8️⃣ Remove Last Character Return string after removing last character. **Example Input:** ```id="s15" matrix ``` **Output:** ```id="s16" matri ``` --- ### 9️⃣ Count Vowels and Consonants Count vowels and consonants in each string. **Example Input:** ```id="s17" hello ``` **Output:** ```id="s18" Vowels: 2 Consonants: 3 ``` --- ### 🔟 Convert to Lowercase Convert uppercase string to lowercase. **Example Input:** ```id="s19" PROGRAM ``` **Output:** ```id="s20" program ``` --- 🎯 By the end of this video, you will be able to solve multiple **string-based problems confidently** and strengthen your logic for coding interviews and DSA. This video is ideal for beginners, students, and anyone preparing for placements. #Java #Strings #JavaProgramming #DSA #CodingInterview #LearnJava

Download

1 formats

Video Formats

360pmp431.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Strings in Java – Complete Guide with Important Practice Problems | DAY 12 of Learning DSA | NatokHD