NVIDIA Interview Question for Software Engineer / Developers


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

The solution to me seems to be making a backtracking program that will go through and assign each number to a letter, generating each by using an iterator. This solution would probably take a while however, since it would need a way to know that it's developed all permutations for a number.

- Student November 15, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

My approach would be to create three trees of height 7. Lets say the number is 800-123-4567 and 1=> a,b,c 2=>d,e,f ...
so tree one will be with root a and children def. tree two will be with root b and children d,e,f.. and each d, e, and f will have their own .. then it will be direct tree traversal from root to leaf will represent one phone number..

- ethioer November 15, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

#include <stdio.h>
#include <string.h>

char *map[10] = {"!", ",", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};

void generatePermute(char *num, int pos, int length)
{
	static char permute[7];
	int i;
	if(pos==length)
	{
		permute[length] = '\0';
		printf("%s\n", permute);
		return;
	}
	for(i = 0 ; i < strlen(map[num[pos]-'0']) ; ++i)
	{
		permute[pos] = map[num[pos]-'0'][i];
		generatePermute(num, pos+1, length);
	}
}
int main()
{
	generatePermute("6236537", 0, 7);
}

- rohitdureja December 02, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More