Associate software engineer Interview Questions | Glassdoor

# Associate software engineer Interview Questions

1,384

associate software engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Associate Business Intelligence Analyst Developer at World Wide Technology was asked...

Oct 28, 2011
 Whats the difference between inner join and outer join?2 AnswersInner Join returns values where the key between the two tables are the same, and values are present in both tables. Outer Join returns the Values from both tables, based on the key, even if there is not any data the joining table. If not value is available, then NULL is returned for that specific Row Data based on the KeySpecified in the WHERE clause, joins simply combine data from multiple tables in the result. INNER JOIN, the most common, returns the rows for which the given ON condition is satisfied for both tables. LEFT/RIGHT OUTER JOIN statements return all the rows from the specified table regardless if there is a match in the unspecified table, with the matching rows specified in the ON condition in the unspecified table.

### Associate Software Engineer at MicroStrategy was asked...

Nov 8, 2016
 Given a scale and an object that can way between 1 to 40 grams. What is the minimum number of counter weights that you can buy to weigh anything in the range of 1 to 40.4 AnswersThe answer is 6. counter weights of 1, 2, 4, 8, 16 ,32Can the answer also be 1, 3, 9, and 27. That means only 4 weightsCan the answer also be 1, 3, 9, and 27. That means only 4 weightsShow More ResponsesCan the answer also be 1, 3, 9, and 27. That means only 4 weights

### Associate Software Engineer at Workday was asked...

Nov 22, 2011
 How would you reverse a the words in a string? (Be able to defend answer)4 AnswersString reverse(String s){ length = s.length()-1; s1 = ""; while(length >=0){ s1 += s[length]; length--; } return s1; } //wrote the code in 1 minute, did not test it or walk through it, use at your own riskI got the other idea of not using a buffer (a better solution) String reverseWithoutBuffer(String s){ if (s.length() == 0 || s.length() == 1){return s;} length = s.length()-1; i = 0; while (i != length){ String s1 = s[i]; s[i] = s[length]; s[length] = s1; i--; length--; } return s; } //did not test it or walk through it, use at your own riskI mean i++ (not i--), sorryShow More ResponsesSorry for another error, it should be while (i < length)

### Associate Software Engineer at Accenture was asked...

Jul 3, 2012
 The interviewer had asked me a time when it was best not to use OOP after spending several minutes praising OOP.4 AnswersThey will sometimes ask questions to see how you react and if you will fake and answer or be honest.When you need space with low level codingWhen you want a lightweight process with the smallest footprint possible.Show More ResponsesIf your using an OO language, you should be using OO principals. The reason is because the compiler is expecting it and has been programmed to write efficient code based on that assumption. I do not respect these types of questions unless it’s for an architect position because it is out of scope of the type of work they are asking you to perform.

Dec 14, 2011

### Associate Software Developer at WebMD Health was asked...

Jun 29, 2015
 Standard FizzBuzz, replacing Fizz with Web and Buzz with MD.3 Answersconst str = "FizzBuzz"; let newStr = str.replace("Fizz", "Web"); let newNew = newStr.replace("Buzz", "MD"); return newNew;let str = "FizzBuzz"; let mapObj = { Fizz:"Web", Buzz:"MD", }; str = str.replace(/Fizz|Buzz/gi, function(matched){ return mapObj[matched]; }); console.log(str)Even better: function replaceAll(str,mapObj){ var re = new RegExp(Object.keys(mapObj).join("|"),"gi"); return str.replace(re, function(matched){ return mapObj[matched]; }); } let str = "FizzBuzz"; let mapObj = { Fizz: "Web", Buzz: "MD" }; console.log(replaceAll(str,mapObj))

Jun 26, 2018

### Associate Software Engineer at Sunview Software was asked...

Aug 17, 2016
 You work in a factory that manufactures balls. One day one of the balls manufactured in a group of eight is slightly heavier than the rest. You have a standard scale with which you can weigh the balls. How would you go about finding the defective ball in the least amount of weighing attempts possible (maximum of 2 attempts).3 AnswersThe solution is fairly simple. Divide the balls into three groups (3,3,2). Weigh the two groups of three first to see if the ball is in one of those groups. If it is then weigh two of the balls from the group it was in, which will tell you which ball was the heavier ball. If it's not in the groups of three then the ball is one of the remaining two. Weigh them to determine which one it is. The interviewer will likely ask how you would do this for a larger group of balls, say 80. The solution doesn't change, still divide the balls into three groups and go from there.wrong - you used the scales at least four times . Use binary search as follows: Step 1: Divide into two groups of 4 balls, A and B. Weigh set A. If set A is correct weight, then set B is the "heavy set", else set A is the heavy set. Step 2: Divide the heavy set into two sets of 2 balls. Weigh one set of two balls. If correct weight, then the other two balls are the "heavy set" Step 3: Weigh one of the two balls. If heavy, then done. If not heavy, then the other ball is the heavy one. This is 3 uses of the scale, minimum possible attempts is "n" where 2 to the n is first power of 2 larger than or equal to the number of balls. For 80 balls, the answer is 7.The question states a maximum of 2 attempts to weigh. The correct solution doesn't involve a binary search, but rather something closer to a ternary search approach as follows: Divide the 8 balls into 3 groups: A=3 B=3 C=2 Then next step is to weigh group A and B. If A is heavier than B, then A contains the heavy ball and we can eliminate groups B and C. This is weight attempt #1. So, take 2 of the balls from group A (A1 and A2) and weigh them (weight attempt #2). Obviously, if A1 or A2 is heavier, then you've found the heaviest ball. If they both weigh the same, then the ball not weighed (A3) is the heaviest. The same logic as above applies to find the heavy ball if group B was heavier than A since there are also only 3 balls in the B group. If A weighs the same as B, then group C must contain the heavy ball. Of course, since there are only 2 balls in C, you only need to weigh both to find the heavy ball. .