Epic Systems Interview Question for Software Engineer / Developers






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

Hi,
Can you please post the complete question? Also, if possible the code.
Thank you
Sam

- Samantha October 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

do the for loop for the corresponding number with the letters. Put all the combinations into the list and then print the combination list.

- weijiang2009 February 06, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public static final String[] keypad = {"", "", "ABC", "DEF", "GHI", "JKL", "MNO", "PQRS", "TUV", "WXYZ"};

String[] ans = printAlphabet(410292);
for (String str : ans) {
	System.out.println(str);
}

static String[] printAlphabet(int num){
		if (num >= 0 && num < 10){
			String[] retStr;
			if (num == 0 || num ==1){
				retStr = new String[]{""};
			} else {
				retStr = new String[keypad[num].length()];
				for (int i = 0 ; i < keypad[num].length(); i++){
					retStr[i] = String.valueOf(keypad[num].charAt(i));
				}
			}
			return retStr;
		}
			
		String[] nxtStr = printAlphabet(num/10);
		
		int digit = num % 10;
		
		String[] curStr = null;
		if(digit == 0 || digit == 1){
			curStr = new String[]{""};
		} else {
			curStr = new String[keypad[digit].length()];
			for (int i = 0; i < keypad[digit].length(); i++){
				curStr[i] = String.valueOf(keypad[digit].charAt(i));
			}
		}
		
		String[] result = new String[curStr.length * nxtStr.length];
		int k=0;
		
		for (String cStr : curStr){
			for (String nStr : nxtStr){
				result[k++] = nStr + cStr;
			}
		}
		return result;
	}

- raj February 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public class Keypad {
public static final String[] keypad = {" ", " ", "ABC", "DEF", "GHI", "JKL", "MNO", "PQRS", "TUV", "WXYZ"};


static StringBuffer s=new StringBuffer();
public void printAlphabets(int number){
int digit = number%10;
int i;
if(number == 0)
{
System.out.print(s.toString()+", ");
return;
}
String currentString = keypad[digit];
for(i = 0;i<currentString.length();i++){
s.append(currentString.charAt(i));
printAlphabets(number/10);
s.delete(s.length()-1,s.length());
}
}

public static void main(String argv[]) {
Keypad key = new Keypad();
key.printAlphabets(410292);
}
}

- jerry March 26, 2012 | 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