Software development intern Interview Questions | Glassdoor.ie

Software development intern Interview Questions

9

software development intern interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given an array of integers [1,2,3,4]. and target t = 5. Come up with a solution that will print out all the unique pairs in the array that are equal t.

3 Answers

Found this very hard, but the interviewer gave subtle hints, and I eventually came up with the idea of using a nested for loop. But I was not completely correct as I had set the inner incrementer to j = 0 instead of j = i+1 .

array a=new array(); foreach(int i in a) { if(i==t) { console.writeline(i.toString()); } } //c# code,i am not sure if this is what they whanted

public class CalculateTuple { /** * @param args */ public static void main(final String[] args) { final int arr[] = { 1, 2, 3, 4 }; final int sum = 5; solution(arr, sum, false); } /** * find possible tuple for provided sum * * @param input * input array * @param expectedSum * expected sum value for the tuple * @param isCommutative * true : (1,2) != (2,1) will give you both tuple <br> * false : (1,2) == (2,1) are same and give you only (1,2) */ public static void solution(final int input[], final int expectedSum, final boolean isCommutative) { final Map indexedArray = new HashMap(); final Map uniquePair = new HashMap(); final int length = input.length; for (int i = 0; i &lt; length; i++) { indexedArray.put(input[i], i); } int count = 0; for (int i = 0; i &lt; length; i++) { final Integer integer = indexedArray.get(expectedSum - input[i]); if (integer != null &amp;&amp; integer != i) { if (isCommutative || (null == uniquePair.get("(" + i + "," + integer + ")") &amp;&amp; null == uniquePair.get("(" + integer + "," + i + ")"))) { System.out.println("(" + i + "," + integer + ")"); uniquePair.put("(" + i + "," + integer + ")", "(" + i + "," + integer + ")"); count++; } } } System.out.println("Found " + count); } }

Very broad questions like my favourite and least favourite thing about my course? Not very technical questions. What would you do if your internet wasn't working was a particularly annoying one.

1 Answer

what is polymorphism and method overriding

1 Answer

Are objects and classes the same , and if not , how are they different?

1 Answer

How would you test a pen?

1 Answer

How would you design an online shopping cart.

1 Answer

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

The first step was to debug 7 simple problems, basically, you have to find out why the code is not running correctly or the output is not as expected (things like a missing symbol or checking the return are good tips). In the second part, you will have to solve two different problems from scratch, you will have to analyze what it is asking you to do and code using the language you are most familiar with. Again, I can’t say anything about the third step, because I didn’t do that part of the process.

1 Answer

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

Explain in as much detail as you can what happens when you search amazon.com in your browser.