Alexander Obregon's Substack

Java LeetCode Solutions

LeetCode #17: Letter Combinations of a Phone Number — Solved in Java

Backtracking with Basic Map and Prebuilt Lookup and Iterative Queue

Alexander Obregon's avatar
Alexander Obregon
Jul 22, 2025
∙ Paid
LeetCode Logo
Image Source

This problem takes a string of digits and asks you to figure out all the possible letter groupings those digits could make based on a classic phone keypad. Each number from 2 through 9 maps to a set of letters, and the goal is to build every combination you can by picking one letter for each digit, in order.

At first, it helps to think of the…

User's avatar

Continue reading this post for free, courtesy of Alexander Obregon.

Or purchase a paid subscription.
© 2025 Alexander Obregon · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture