Tesla Interview Question

https://leetcode.com/problems/letter-combinations-of-a-phone-number/ optimize on space complexity, which would need to be done using dfs,