Given a string containing digits from 2-9, return all possible letter combinations that the number could represent (like a telephone keypad). Return empty array for empty input.
Input: digits = "23"
Output: ["ad","ae","af","bd","be","bf","cd","ce","cf"]
Topics: backtracking, hash-map
Asked by: Amazon, Google, Meta, Microsoft, Apple, Bloomberg
Time complexity: O(4^n × n). Space complexity: O(4^n × n).