Articles
Explore our collection of technical articles and tutorials

Find the Index of the First Occurrence in a String
Find the first occurrence of a substring in a string. Learn brute-force and pointer-based approaches with dry runs, algorithms, and complexity analysis.

String to Integer (atoi)
Learn how to convert a string to a 32-bit integer with myAtoi. Covers brute-force and state-machine approaches with complexity and dry runs.

String Compression
Learn how to compress a character array in place using two pointers. Covers brute-force vs optimal approach with time and space complexity explained.

Longest Palindromic Substring
Find the longest palindromic substring in a string using brute-force and center-expansion methods. Learn algorithms, dry runs, and time-space analysis.

Group Anagrams
Group words that are anagrams of each other using sorting and hash maps. Learn brute-force vs optimal approaches with examples and complexity.

Reorganize String
Rearrange a string so no two adjacent characters are the same. Learn greedy frequency-based logic with examples, edge cases, and complexity analysis.

Isomorphic Strings
Learn how to check if two strings are isomorphic using efficient mapping techniques. Maintain one-to-one character with examples and complexity.

Reverse Vowels of a String
Reverse only the vowels in a string while keeping other characters in place. Learn brute-force and two-pointer methods with examples and complexity.

Longest Common Prefix in a String
Find the longest common prefix among an array of strings. Learn brute-force and vertical scanning methods with examples, edge cases, and complexity.

Reverse Only Letters - Reverse a string without affecting special characters
Reverse only letters in a string while keeping non-letter characters in place. Learn brute-force and two-pointer methods with examples and complexity.

Valid Anagram - Check if two Strings are anagrams of each other
Learn how to check if two strings are anagrams using sorting and hash maps, with clear examples, real-life analogy, and complexity analysis.

Longest Increasing Subsequence
Longest Increasing Subsequence | CodehelpLongest Increasing Subsequence | CodehelpLongest Increasing Subsequence | CodehelpLongest Increasing Subsequence | CodehelpLongest Increasing Subsequence | Codehelp