Software Developer Intern Interview Questions in Boston, MA | Glassdoor

# Software Developer Intern Interview Questions in Boston, MA

10

Software developer intern interview questions shared by candidates

## Top Interview Questions

### Software Development Engineer Intern at Amazon was asked...

Apr 1, 2014
 write a function that takes in an int and returns a string that would be how one would say that number (ex: 123 -> one hundred twenty three; 50019 -> five thousand nineteen).3 Answersimport java.util.Scanner; import java.util.HashMap; /** * * @author Chepa */ public class prog2 { static HashMap h1 = new HashMap(); static HashMap h2 = new HashMap(); public static void main(String[] args){ Scanner s = new Scanner(System.in); System.out.println("Enter number "); int n = s.nextInt(); h1.put(1, "One"); h1.put(2, "Two"); h1.put(3, "Three"); h1.put(4, "Four"); h1.put(5, "Five"); h1.put(6, "Six"); h1.put(7, "Seven"); h1.put(8, "Eight"); h1.put(9, "Nine"); h1.put(10, "Ten"); h1.put(11, "Eleven"); h1.put(12, "Twelve"); h1.put(13, "Thirteen"); h1.put(14, "Fourteen"); h1.put(15, "Fifteen"); h1.put(16, "Sixteen"); h1.put(17, "Seventeen"); h1.put(18, "Eighteen"); h1.put(19, "Nineteen"); h2.put(2, "Twenty"); h2.put(3, "Thirty"); h2.put(4, "Fourty"); h2.put(5, "Fifty"); h2.put(6, "Sixty"); h2.put(7, "Seventy"); h2.put(8, "Eighty"); h2.put(9, "Ninety"); String output = getStringRepresentation(n); System.out.println("Output: " + output); } public static String getStringRepresentation(int n){ StringBuilder sb = new StringBuilder(); String temp; int x = n / 1000000; if(x > 0){ temp = getStringFor3Digits(x); sb.append(temp).append(" Million"); } n = n % 1000000; x = n / 1000; if (x > 0){ System.out.println("For thousand x = " + x); temp = getStringFor3Digits(x); sb.append(" ").append(temp).append(" Thousand"); } n = n % 1000; if(n > 0){ temp = getStringFor3Digits(n); sb.append(" ").append(temp); } return sb.toString(); } public static String getStringFor3Digits(int n){ StringBuilder sb = new StringBuilder(); int x = n / 100; if(x > 0){ System.out.println("In hundred x = " + x + " " + h1.get(x)); sb.append(h1.get(x)).append(" Hundred"); } n = n % 100; if (n 0){ sb.append(" ").append(h2.get(x)); } n = n % 10; if(n > 0) sb.append(" ").append(h1.get(n)); } return sb.toString(); } }def numberReader(x): words = "" numbers = { 0: "", 1: "One ", 2: "Two ", 3: "Three ", 4: "Four ", 5: "Five ", 6: "Six ", 7: "Seven ", 8: "Eight ", 9: "Nine ", 10: "Ten ", 11: "Eleven ", 12: "Twelve ", 13: "Thirteen ", 14: "Fourteen ", 15: "Fifteen ", 16: "Sixteen ", 17: "Seventeen ", 18: "Eighteen ", 19: "Nineteen ", 20: "Twenty ", 30: "Thirty ", 40: "Forty ", 50: "Fifty ", 60: "Sixty ", 70: "Seventy ", 80: "Eighty ", 90: "Ninty " } ln = len(str(x)) strx = str(x) if x 20 and x = 4 and ln 6 and ln 9 and ln <= 12: words += numberReader(int(strx[:ln-9])) + "Billion " + numberReader(int(strx[-9:])) return words.capitalize()I think you didn't take in consideration the fact that an int can be a negative number. For example in python sript len(str(abs(x))) would give you the result you wanted. Cause minus would give higher length.

### Software Development Intern at Microsoft was asked...

Feb 17, 2014
 1. How do you test a key board? 2. Given nine items and one of them is heavier than the others, how do you find the heavier one using a scale just twice?1 AnswerFor Question Two: Split into 3,3, and 3; ->a,b,c if(a==b) split c into 1,1,1;->d,e,f else split the heavier into 1,1,1 weight it if(d==e) return f else return the heavier one

### Software Developer Intern at Eze Software was asked...

Jun 13, 2013
 Nothing , all were standarad questionsBe the first to answer this question

### Software Developer Intern at Eze Software was asked...

Jun 4, 2013
 Not so difficult questions if you are well versed with object oriented programingBe the first to answer this question

### Software Developer Intern at Cogo Labs was asked...

May 22, 2013
 Nothing too crazy, just basic CS questions.Be the first to answer this question

### Software Development Engineer Intern at Intuit was asked...

Mar 11, 2013
 Given all the resources and time in the world what will you develop, please note you need to be innovative?1 AnswerNA

### Software Development Intern at Veson Nautical was asked...

May 1, 2012
 Given two robots on an infinite line of integers, with a flag guaranteed to be between them, write a behavior for both robots to follow which will guarantee them to eventually meet. The robots can only "see" the position they are standing on, and can't remember anything. Also note that they can't tell if they are the leftmost or rightmost robot. They can tell if they are on the flag or the other robot. They may move right, move left, or wait.1 AnswerThe answer involved moving both robots to the right (or left) until one of them encounters the flag, at which point it would increase its speed (move twice instead of moving then waiting) until it caught up with the other bot.

### Software Development Intern at Veson Nautical was asked...

May 1, 2012
 Write an integer-to-string function in C++.1 AnswerThe answer involved dividing the integer by successively smaller amounts, relying on the fact that integer division floors the quotient, to "grab" characters corresponding to the numbers starting from the left and going to the right. There had to be three cases, one in which the number was negative, one in which it was zero, and one in which it was positive. Leading zeros should not be added to string.

### Software Developer Intern at Veson Nautical was asked...

Jun 27, 2010
 difference between abstract class and interface1 AnswerIn short, an interface has only the name, parameters, and return types. An interface does not implement these in anyway. An abstract class can do everything an interface does and more, it can define what a method does. Interfaces do not consume the CPU as much as abstract classes because they are only the names for the members to be implemented while abstract classes may have some methods implemented.

### Software Developer Intern at Veson Nautical was asked...

Jun 27, 2010
 describe different data structures and its complexities .Be the first to answer this question
110 of 10 Interview Questions