Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Started with the discussion why do you want to join DE shaw. Since prior to my current company, I was working with a finance based company so they asked why do you want to come back to finance base company. So they asked my about debentures, bonds, mortgages and other financial jargons.
Then they asked questions related to DSA, OS etc.



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Sorting can be used to solve this problem. Next, two-pointer technique can be applied on the sorted array.
Traverse the array and fix the first element of the triplet. Now use the Two Pointer technique to find if there is a pair whose sum is equal to x – array[i].
• Algorithm :
1. Sort the given array.
2. Loop over the array and fix the first element of the possible triplet, arr[i].
3. Then fix two pointers, one at i + 1 and the other at n – 1. And look at the sum,
3.1. If the sum < required sum, increment the first pointer.
3.2. Else, If the sum > required sum, Decrease the end pointer to reduce the sum.
3.3. Else, if the sum of elements at two-pointers == required sum, then print the triplet and break.
Time Complexity : O(n*log(n))



1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.
2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".
3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
The idea is to use the sorted arrival and departure times of trains and count the total number of platforms needed at a time . Maintain a counter to count the total number of trains present at the station at any point.
If the train is scheduled to arrive next, increase the counter by one and update the minimum platforms needed if the count is more than the minimum platforms needed so far.
If the train is scheduled to depart next, decrease the counter by 1.
Time Complexity : O(n*log(n))
Internal fragmentation v/s external fragmentation.
1. In internal fragmentation fixed-sized memory, blocks square measure appointed to process. In external fragmentation, variable-sized memory blocks square measure appointed to the method.
2. Internal fragmentation happens when the method or process is larger than the memory. External fragmentation happens when the method or process is removed.
3. The solution of internal fragmentation is the best-fit block. The solution to external fragmentation is compaction and paging.
4. Internal fragmentation occurs when memory is divided into fixed-sized partitions. External fragmentation occurs when memory is divided into variable size partitions based on the size of processes.
5. The difference between memory allocated and required space or memory is called Internal fragmentation. The unused spaces formed between non-contiguous memory fragments are too small to serve a new process, which is called External fragmentation.
Write SQL Query to find employee with nth highest salary.
TOP keyword can be used to find the nth highest salary. By default ORDER BY clause print rows in ascending order, since we need the highest salary at the top, we have used ORDER BY DESC, which will display salaries in descending order. Again DISTINCT is used to remove duplicates. The outer query will then pick the topmost salary, which would be your Nth highest salary.
SQL query :
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP N salary
FROM #Employee
ORDER BY salary DESC
) AS temp
ORDER BY salaryHow is Java platform independent?
In the case of Java, it is the magic of Bytecode that makes it platform independent.
This adds to an important feature in the JAVA language termed as portability. Every system has its own JVM which gets installed automatically when the jdk software is installed. For every operating system separate JVM is available which is capable to read the .class file or byte code.
Difference between Abstract Class and Interface.
1) Abstract class can have abstract and non-abstract methods. Interface can have only abstract methods. Since Java 8, it can have default and static methods also.
2) Abstract class doesn't support multiple inheritance. Interface supports multiple inheritance.
3) Abstract class can have final, non-final, static and non-static variables. Interface has only static and final variables.
4) Abstract class can provide the implementation of interface. Interface can't provide the implementation of abstract class.
5) The abstract keyword is used to declare abstract class. The interface keyword is used to declare interface.
6) An abstract class can extend another Java class and implement multiple Java interfaces. An interface can extend another Java interface only.
7) An abstract class can be extended using keyword "extends". An interface can be implemented using keyword "implements".

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?