Software Engineer Interview Questions in Chicago, IL | Glassdoor

# Software Engineer Interview Questions in Chicago, IL

Software engineers write programs to design and develop computer software. Interviews are highly technical, so come ready to work through coding problems and math brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific software discipline such as web development, application development, or system development.

## Top Interview Questions

Sort: RelevancePopular Date

### Software Engineer II at Orbitz Worldwide was asked...

Dec 11, 2010
 How can you solve n^m efficiently only using +, -, *, /.4 AnswersThis is one solution that doesn't deal with negative exponents exp(n, m) { if (m == 0) return 1 if (m == 1) return n exp = exp(n, m / 2) if ( isOdd(m) ) exp = exp * n return exp }int f(int n, int m) { if(m==0) return 1; if(m==1) return n; n=n*f(n,(m-1)); return n; }There is no need to solve it recursively. it is pretty simple int calculateExp(int n, int m) { exp = n for (i = 1; i <= m; i++) { exp = exp*n } return exp; }Show More ResponsesDisadvantage of recursion is the large amount of space on the stack for a large m in this case.

Dec 5, 2012
 "Reverse" of the problem if finding k-th smallest element in a tree: I had to find k-th largest.4 AnswersKeep a global or reference counter increase it every time you encounter a tree node. Return when the counter == k.do an in-order traversal which gives you a sorted list. the rest is obvious.do an in-order traversal which gives you a sorted list. the rest is obvious.Show More ResponsesThe tree data structure is red herring, it does not help in any way to find the kth element The solution to this problem is called partial sorting and can achieve O(n) - number of nodes time complexity

Oct 25, 2011
 If you have a ransom letter and magazines, can you construct the ransom letter from the words in the magazine.4 AnswersYou can create a binary search tree like red black with all the words in the magazine. this will take o(n) (o(1) amortized * n words). now we need to search k times the magazine so in total O(n) +O(klogn) Another option is to hash with chaining (linked lists)all the words in the magazine, this will take o(1) for each insert and then lookup will take o(1) amortized as well (but w.c o(n) fir every word) so total o(n) and w.c O(k*n) if we will use hash wit open addressing that means we will not have multiple values in the same cell. if we'll define tha size of the hash as m then our load factor is n/m the bigger m the less time for insert and lookup, an in the total o(n * (1/(1-n/m))).Find out the character set of the letter. If the character set is ASCII then create an integer array of size 256 and use characters as index/ 1. Scan through the ransom letter and increment the count of occurrences for each character at that index. 2. Then pick up each magazine and scan through the magazine, here at each character decrement the character count in the array created above. 3. Scan through the count array and when it reaches zero. return true or else false.1) Create a trie by reading the words from the magazines. If size is an issue, use DAWG 2) Search if every word exists in the trie. If not, return false. Otherwise return true.Show More ResponsesThis is such a weird question. I'm not sure I understand it correctly... If I'm writing the ransom letter, yes. I assume I at least have a magazine about plants? (Because plants die). I'd type the desired ransom letter, and write a simple script to find the words in any of my magazines. I'd probably make sure that the found words are chosen evenly and randomly. I don't want an unique magazine selection to point the cops toward me. The script would take note of the page, paragraph, and word so I can manually find it and cut it out.

### Software Engineer at PEAK6 Investments was asked...

May 15, 2011
 Find the height of a binary tree3 AnswersClass Node { int data; Node left; Node right; } public static int heightOfTree(Node node) { if(node!=null) { return (heightOfTree(node.left)+1+heightOfTree(node.right)); } }The above post gives too big of an answer except in trees that are technically Linked Lists. Replace the return line with the following to *actually* get the height of a tree: return 1 + max(heightOfTree(node.left), heightOfTree(node.right)); Also, the above function could possibly terminate without returning anything. Add an else condition that returns 0 as the base case./** Returns the max root-to-leaf depth of the tree. Uses a recursive helper that recurs down to find the max depth. */ public int maxDepth() { return(maxDepth(root)); } private int maxDepth(Node node) { if (node==null) { return(0); } else { int lDepth = maxDepth(node.left); int rDepth = maxDepth(node.right); // use the larger + 1 return(Math.max(lDepth, rDepth) + 1); } }

### Software Engineer Internship at Orbitz Worldwide was asked...

Mar 18, 2011
 What is the angle between hour hand and minute hand at 3.15?2 AnswersLets deal with the hour hand first. In 60 minutes (1 hour) the hand travels 5 minutes on the clock face, so in 1 minute it travels 0.0833 minutes on the clock face (5/60). At 3'0clock the hour hand was exactly at 3. After 15 minutes it has moved 0.0833*15 = 1.25 minutes on the clock face. At 3.15 the minute hand is exactly at 3, so the difference between the hour and minute hand is 1.25 minutes. So now we just convert 1.25 minutes into degrees to get the angle between the two hands. We do that with the following logic - in 60 minutes the minute hand turns 360 degrees, so in 1 minute the hand turns 360/60 = 6 degrees, so in 1.25 minutes the hand turns 6*1.25 = 7.5 degrees. This is the angle between the two hands at 3.15http://en.wikipedia.org/wiki/Clock_angle_problem

Jan 12, 2012
 Given a set of numbers 1-100, find the missing one.2 AnswersAdd up the sum of numbers 1-100, and then also sum up the given set of a numbers. Find the difference between the sums, that is the missing number.It is true that the solution should introduce the summing of all the elements of an array. But rather than summing the numbers between 1-100 simply use the formula (N * (N + 1)) / 2

### Senior Software Engineer at Cummins-Allison was asked...

Jan 6, 2013
 The skill test was interesting, but not really difficult. I felt more constrained by the amount of time I had and the developer "looking over my shoulder."2 Answerscan you please share the some of the technical questions?It has been over a year since the interview, but here's what I can remember: - One question was related to method calling in C++ inheritance. I couldn't remember a lot about that since it's been *years* that I've coded in C++. The hiring manager said they do not use C++ much, but yet I got a question related to it. - Within a set of integers representing an arbitrary waveform, find the peak value. - Bit manipulation in C (swap bytes, I think). - How would you go about finding the beginning of an image in a photo? That's all I can remember. Good luck.

### Software Engineering Intern at DRW was asked...

Feb 23, 2011
 Coin game: board divided in quarters. A coin rests in each spot. You do not know their original configuration. In each turn, you can choose flip any number of coins. Specify a sequence of turns that guarantees that at some point all coins will be facing the same direction. Second question: between each of your turns, the board will be rotated an arbitrary amount (90, 180, 270 degrees). Specify a sequence of moves that guarantees that at some point all coins will be facing the same direction.2 AnswersTough one to ask. IMHO, not a very good interview question but a fun riddle to think about. Not sure this is right, but here goes: 1. Brute force solution would be flipping all combinations 15 through 8 of coins back and forth - which is SUM(N choose K) k from (n-1) to n/2, where n is number of spaces on board. 2. For the rotation - I assume you mean random rather than "arbitrary". In which case, flipping the two coins along a diagonal from a corner will eventually get to the state with all facing in the same direction.Whoops, I thought it was a 4x4 board for some reason. 2x2 is the same, but simpler.

### Senior Software Engineer at Alcatel-Lucent was asked...

Jun 7, 2010
 how would you design a software system? what tools can you use to estimate time required?2 Answersdescribed the phases of software developement and how i will go from requirement gathering, analysis, talking to BA's to understand business requirement, etc.linux has an inbuilt profilers present.