Here’s a set of questions asked to one of our readers in DE Shaw off campus interview.
Round 1 : (Telephonic Interview)
- It startes with some behavioural questions like a brief introduction of myself.
- Then they started asking technical questions.Mainly on OOPS Concepts like abstraction, encapsulation and examples for each.
- Polymorphism – Static and dynamic. why the name is static and dynamic.Again With Examples.
- What is final keyword in Java ?
- What’s a Dangling Pointer and how to correct this.
- How would you get total number of words in a file (In Unix).
- Given two strings . you need to tell whether they are permutation of each other. Various approaches and their complexities.
- Given a string. You need to print first non-repeating char. I told him we would use count array, count.
Counter question: How would you reduce space complexity. I told him we could use Hash table. In that, we would only be needing spaces equal to number of different characters.
- 100 storey building.One egg given (Yes, only one egg)… find from which level egg would break in number of attempts less than 200.
- Four numbers are given: 1 3 4 6 = 24. Use any mathematical operators. I asked him can i write this expression in C and run it from there to get required result. He said yeah you can.
Then i took 4 integer variables(1,3,4,6) and another integer variable result. Now, 1/3 = 0 (C integer division). so simply 4*6 would give me 24. Pretty simple :D. He said it’s okay, but try with mathematical operators only. (No coding :D)
Answer: (1^3) * (4*6) = 24
Code: (It was to be sent through email)
- Write well commented code to print Matrix in Spiral Order . Also write some test cases.
Round 2: (In-house Interview)
- Discussions on Various basic concepts like What makes Java Platform Independent language, Why C is Platform dependent, difference between JDK, JRE and JVM, What’s a byte code (In Java) and discussion went on like this.
- What’s a function pointer ? Where it’s used. Write a code to implement the same.
- Is it possible to have try-finally block without catch block ? And several other similar discussions on Exception Handling.
- What’s a Process ? What are various sorts of Process Scheduling Algorithms. Design a data structure which can be efficiently used to schedule processes based on their priorities. Further they added that Priorities of some processes can change any time and we should be able to pick that process which is having maximum priority (Min Heap concept). Also there can be many processes of same priority. Some discussions on approaches.
- What’s difference between extends and implements ? Some discussions on Abstract class and Interface.
- Why Java does NOT support Multiple Inheritance ? How we solve Diamond Ring Problem in C++ (Virtual Inheritance). How to access a specific function from a class in case of multiple inheritance ? (Ans: Using scope resolution operator)
- What’s the difference between #define MAX 30 and const int max = 30.
- What is ‘register’ storage class ? If we have declared any variable register and there is no free registers available, what will happen ? Will compiler throw any sort of errors/warnings ?
- In C, Where can we find definition of printf(). Some discussions on header files and Process execution steps (like preprocessing, compilation, loading, linking etc).
- Do we have destructors in Java ? Can we explicitly destroy objects in Java ?
- Given a binary complete tree like:
/ \ / \
1 7 2 4
Convert it into level order sorted tree like:
/ \ / \
4 5 6 7
Code was required.
Have got some interview questions submit it here.So that we can help other candidates like you to land their dream job