For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
Given a string of digits representing a phone number of variable length (N), find all possible valid words that can be formed using the traditional phone number letter mapping. This mapping is as follows:
You are required to build a build_options function which returns all valid words that can be spelled using the digits in the given phone number.
/var/lib/dict from Linux systems) is available.load_dict() exists, which loads the dictionary into a data structure (e.g., a list). This function returns a list of words, for example: ['a', 'and', 'also', ..., 'zebra'].Given build_options('76278'), the function should return valid words such as ['roast', 'smart', 'snast'].
Given a string of digits representing a phone number of variable length (N), find all possible valid words that can be formed using the traditional phone number letter mapping. This mapping is as follows:
You are required to build a build_options function which returns all valid words that can be spelled using the digits in the given phone number.
/var/lib/dict from Linux systems) is available.load_dict() exists, which loads the dictionary into a data structure (e.g., a list). This function returns a list of words, for example: ['a', 'and', 'also', ..., 'zebra'].Given build_options('76278'), the function should return valid words such as ['roast', 'smart', 'snast'].
Output