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…

Keep reading with a 7-day free trial

Subscribe to Alexander Obregon's Substack to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Alexander Obregon
Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture