Improved algorithmic skills with LeetCode Java problems

💻 Strengthening My Algorithmic Skills with LeetCode (Java) Recently solved a few problems focusing on string manipulation and pattern-based logic, which helped me improve both problem decomposition and implementation clarity: 🔹 Zigzag Conversion Implemented a pattern-based traversal to simulate zigzag text arrangement across multiple rows. Approach: Row-by-row traversal Time Complexity: O(n) 🔹 Find the Index of the First Occurrence in a String (strStr) Developed a substring matching solution using a straightforward iterative comparison. Approach: Sliding window Time Complexity: O(n × m) 🔹 Reverse Words in a String Solved by splitting the input string, trimming spaces, and reconstructing it in reverse order. Approach: String split + reverse iteration Time Complexity: O(n) These problems helped strengthen my understanding of string operations, pattern logic, and efficient iteration techniques. #LeetCode #Java #DSA #ProblemSolving #Algorithms #Coding #SoftwareEngineering

To view or add a comment, sign in

Explore content categories