LeetCode 482: License Key Formatting in Java

Day 97 of #100DaysOfCode 💻 📌 LeetCode Problem 482 – License Key Formatting Today’s problem focused on string manipulation and formatting logic. 🔹 The task: Reformat a license key string so that: All letters are uppercase Groups are separated by - Each group has exactly k characters, except possibly the first 🔹 What I practiced: Traversing strings from the end Using StringBuilder efficiently Handling edge cases like trailing dashes and mixed characters 🔹 Approach: Remove all existing dashes Convert letters to uppercase Build new groups from the end and reverse the result 📚 Language: Java 🧠 Concepts: Strings, StringBuilder, Edge Cases, Formatting 97 days down — almost at the finish line! 💪🔥 #Day97 #LeetCode #Java #DSA #100DaysChallenge #StringManipulation #CodingJourney #Consistency

  • No alternative text description for this image
Valentin Soare

Full-Stack Developer (Kotlin/Java) & DevOps Engineer @ LSEG (London Stock Exchange Group) | Oracle Java Certified | HashiCorp Terraform & 2x AWS Certified

4mo

your approach with stringbuilder really shows how much thought went into the efficiency side of things. the way you handled that tricky first group situation by working backwards is clever.

Like
Reply

To view or add a comment, sign in

Explore content categories