Skip to main content

Posts

Showing posts from October 13, 2019

GOOGLE PROGRAMMING QUESTION

@V google program Try to Solve it by your self I can give you Solution after a 2 Day's.. on my Solution this Page. QUESTION OF THE WEEK :- QUESTION 5 :- Given a mapping of digits to letters (as in a phone number), and a digit string, return all possible letters the number could represent. You can assume each valid number in the mapping is a single digit. CODE :- #include <stdio.h>  #include <string.h>  const char hashTable[10][5] = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};  void printWordsUtil(int number[], int curr_digit, char output[], int n)  {  int i;  if (curr_digit == n)  {  printf("%s ", output);  return ;  }    for (i=0; i<strlen(hashTable[number[curr_digit]]); i++)  {  output[curr_digit] = hashTable[number[curr_digit]][i];  printWordsUtil(number, curr_digit+1, output, n);  ...