You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*Given an integer n, using phone keypad find out all the possible strings that can be made using digits of input n.
2
+
Return empty string for numbers 0 and 1.
3
+
Note : 1. The order of strings are not important.
4
+
2. Input and output has already been managed for you. You just have to populate the output array and return the count of elements populated in the output array.
5
+
Input Format :
6
+
Integer n
7
+
Output Format :
8
+
All possible strings in different lines
9
+
Constraints :
10
+
1 <= n <= 10^6
11
+
Sample Input:
12
+
23
13
+
Sample Output:
14
+
ad
15
+
ae
16
+
af
17
+
bd
18
+
be
19
+
bf
20
+
cd
21
+
ce
22
+
cf
23
+
*/
24
+
25
+
26
+
27
+
#include<string>
28
+
usingnamespacestd;
29
+
30
+
intkeypad(int num, string output[]){
31
+
/* Insert all the possible combinations of the integer number into the output string array. You do not need to
32
+
print anything, just return the number of strings inserted into the array.
0 commit comments