Filter interviews by
To burn a node in a binary tree, we mark the node as burned and then recursively burn its left and right children.
Mark the current node as burned
Recursively burn the left child
Recursively burn the right child
Normalisation is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalisation helps to eliminate data redundancy and inconsistencies
It ensures that each piece of data is stored in only one place
It helps to improve data integrity and accuracy
It makes it easier to maintain and update the database
There are different levels of normalisation, each with its own set of rules ...
Default constructor is provided by the compiler if no constructor is defined. Copy constructor creates a new object by copying an existing object.
Default constructor initializes member variables to default values.
Copy constructor creates a new object with the same values as an existing object.
Default constructor is called automatically by the compiler if no constructor is defined.
Copy constructor is called when an...
Recursion function is a function that calls itself until a base condition is met.
Recursion is a technique used to solve problems by breaking them down into smaller sub-problems.
It involves a function calling itself with a modified input until a base case is reached.
Recursion can be used to solve problems such as factorial, Fibonacci series, and binary search.
Recursion can be implemented using loops as well, but it...
Primary key uniquely identifies a record in a table, while unique key ensures that all values in a column are distinct.
Primary key can't have null values, while unique key can have one null value.
A table can have only one primary key, but multiple unique keys.
Primary key is used as a foreign key in other tables, while unique key is not.
Example: Primary key - employee ID, Unique key - email address.
Library functions are pre-written code that can be reused to perform common tasks.
Library functions save time and effort by providing pre-written code.
They are often included in programming languages or external libraries.
Examples include functions for string manipulation, mathematical calculations, and file input/output.
Library functions can be called from within a program to perform specific tasks.
They can also ...
DML is Data Manipulation Language used to manipulate data in a database. DLL is Data Definition Language used to define database schema.
DML is used to insert, update, delete data in a database.
DLL is used to create, alter, drop database objects like tables, views, indexes.
DML statements include INSERT, UPDATE, DELETE.
DLL statements include CREATE, ALTER, DROP.
DML affects data in a database, DLL affects the structu...
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) which C does not have.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reusability and saves time and effort in programming.
The existing class is called the superclass or parent class, and the new class is called the subclass or child class.
The subclass inherits all the properties and methods of the superclass and can also add it...
Access specifiers are keywords in object-oriented programming languages that determine the visibility and accessibility of class members.
Access specifiers are used to restrict access to class members.
There are three types of access specifiers: public, private, and protected.
Public members can be accessed from anywhere in the program.
Private members can only be accessed within the class.
Protected members can be acc...
To burn a node in a binary tree, we mark the node as burned and then recursively burn its left and right children.
Mark the current node as burned
Recursively burn the left child
Recursively burn the right child
I applied via Newspaper Ad and was interviewed in Jun 2024. There was 1 interview round.
Duration 2hr , DSA all topics , Leetcode
I applied via Campus Placement and was interviewed in Feb 2023. There were 2 interview rounds.
4 interview question
Find minimum cost to make heights of N piles of coins equal by adding or removing one coin from a pile with different costs.
Use dynamic programming to keep track of the minimum cost for each pile height.
Consider the cost of adding and removing coins from each pile.
Iterate through all possible combinations of adding and removing coins to find the minimum cost.
I appeared for an interview in Mar 2022.
Round duration - 120 Minutes
Round difficulty - Hard
Online Test Platform - HackerRank
Test Access Window – between 10:00 AM to 6:00 PM
Online Test Pattern –
Total Duration of Test – 120 mins
Total No. of Sections - 5
Section 1 – One Coding Question - Easy difficulty (20 mins)
Section 2 – One Coding Question - Medium difficulty (30 mins)
Section 3 – One Coding Question - Medium difficulty (30 mins)
Section 4 - Technical MCQs - 10 questions (20 mins)
Section 5 - Aptitude MCQs - 10 questions (20 mins)
Programming Sections (1, 2 and 3): This will have 3 coding questions with a time limit of 80 minutes. It is mandatory for you to attempt the 1st coding question before moving to the second question and third. You cannot revisit question/section once you proceed ahead
MCQ Sections (4 and 5): This will have 10 technical and 10 aptitude questions, with a time limit of 20 minutes each. Each correct answer will carry 2 marks and wrong answer will carry negative 0.5
Technical questions will cover Data structures & algorithms, Operating systems, Database systems, SQL and Networks.
Aptitude questions will cover Quantitative Aptitude, Problem solving and Logical & verbal Reasoning
Given an array 'ARR' of 'N' cubes, you need to construct towers such that each cube can either be placed on top of an existing tower or start a new one. The restriction is...
The task is to determine the minimum number of towers needed to stack cubes in a specific order.
Iterate through the array of cubes and maintain a stack to keep track of towers.
For each cube, check if it can be placed on an existing tower or start a new one.
Update the stack based on the cube's size and count the number of towers needed.
Return the minimum number of towers required.
Example: For input N = 3, ARR = [3, 2, 1...
Given an array ARR
of size N
and an integer K
, determine the minimum number of elements that must be removed from the array so that the difference between the maximum an...
The problem involves finding the minimum number of elements to remove from an array so that the difference between the maximum and minimum element is less than or equal to a given value.
Iterate through the array and keep track of the minimum and maximum elements.
Calculate the difference between the maximum and minimum elements.
If the difference is greater than the given value, increment the count of elements to remove.
...
Aragorn, an influential ruler, aspires to expand his power by conquering more kingdoms. There are 'N' kingdoms numbered from 0 to N-1, forming a tree structur...
Given a tree structure of kingdoms, determine if it's possible to conquer more kingdoms than Aragorn by strategically choosing the starting kingdom.
Start at the kingdom adjacent to Aragorn's initial kingdom
Choose the kingdom that allows you to capture the most number of kingdoms in subsequent turns
Consider the tree structure to plan your conquest strategically
Round duration - 60 Minutes
Round difficulty - Medium
They called and asked me to choose a date and time I would be free in the upcoming week for my interview.
I chose 10th March 5 pm.
Interviewer was pretty friendly. Started with some resume based questions. Asked me OS, DBMS and JAVA based questions. A coding question was asked to code. Asked me OOPS related questions too.
Given an integer array ARR
and an integer K
, identify the K
most frequent elements within ARR
. Return these elements sorted in ascending order.
Identify K most frequent elements in an array and return them sorted in ascending order.
Use a hashmap to store the frequency of each element in the array.
Sort the elements based on their frequency in descending order.
Return the first K elements from the sorted list.
Tip 1 : Learn the OS and DBMS fundamentals.
Tip 2 : Practice a wide variety of questions on Leetcode
Tip 3 : Do practice aptitude. It will help in OA
Tip 1 : Use OverLeaf format to make resume
Tip 2 : Do not mention any skill you aren't comfortable with. A lot of the times they ask you questions based on what is written in your resume.
I appeared for an interview in Aug 2021.
Round duration - 90 Minutes
Round difficulty - Medium
This round had 3 coding questions. The first two were of moderate level and the third one was a bit hard and was related to Dynamic Programming.
Given a linked list where each node contains a single digit, your task is to construct the largest possible number using these digits.
Print ...
To find the maximum number that can be formed using the digits present in a linked list.
Traverse the linked list and store the digits in an array
Sort the array in descending order
Concatenate the sorted array elements to form the maximum number
You are given an array/list CHOCOLATES
of size 'N', where each element represents the number of chocolates in a packet. Your task is to distribute these chocolates among 'M'...
Distribute chocolates among students to minimize difference between largest and smallest packets.
Sort the array of chocolates packets.
Use sliding window technique to find the minimum difference between largest and smallest packets distributed to students.
Return the minimum difference as the output.
Given three strings A, B, and C, determine the length of the longest common subsequence present in all three strings.
A subsequence is derived by dele...
Find the length of the longest common subsequence among three strings.
Use dynamic programming to solve this problem efficiently.
Create a 3D array to store the lengths of common subsequences.
Iterate through the strings to fill the array and find the longest common subsequence length.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions of DS/Algo to solve under 60 minutes and 2 questions related to Operating Systems.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and calculate the maximum profit that can be achieved by buying and selling at different points.
Keep track of the maximum profit after the first transaction and the maximum profit overall by considering all possible combinations of bu...
You are provided with an array called HEIGHT
that contains the heights of 'N' people standing in a queue. For each person in the array, compute the number of individuals on t...
Count the number of people to the right with a smaller height for each person in a queue.
Iterate through the array from right to left and maintain a sorted list of heights encountered so far.
Use binary search to find the position where the current height should be inserted in the sorted list.
The count of smaller people to the right for each person can be calculated based on the index of insertion in the sorted list.
Processes are instances of programs in execution, while threads are smaller units within a process that can execute independently.
Processes are independent entities that contain program code, data, and resources.
Threads are lightweight units within a process that share the same resources but can execute independently.
Processes have their own memory space, while threads share the same memory space.
Processes communicate ...
Different types of semaphores include binary semaphores, counting semaphores, and mutex semaphores.
Binary semaphores: Can only have two states - 0 or 1. Used for mutual exclusion.
Counting semaphores: Can have multiple states. Used for resource allocation and synchronization.
Mutex semaphores: Similar to binary semaphores but with additional features like priority inheritance and deletion safety.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 3 coding questions in which I first had to explain my approach with proper complexity analysis and then code up the solution. I found the first problem to be a bit on the harder side compared to the rest of the 2 problems.
Given a matrix of non-negative integers of size 'N x M', where 'N' and 'M' denote the number of rows and columns respectively, find the length of t...
Find the length of the longest increasing path in a 2D matrix by moving in four directions.
Use dynamic programming to keep track of the longest increasing path starting from each cell.
Explore all four directions from each cell and recursively find the longest increasing path.
Optimize the solution by storing the length of the longest increasing path starting from each cell.
You are presented with a circular track consisting of several petrol pumps. Each petrol pump is indexed from 0 to N-1 and offers certain attributes:
Find the first petrol pump from which a truck can start its journey and complete the circle.
Iterate through each petrol pump and calculate the remaining petrol after reaching the next pump.
If the remaining petrol is negative at any point, reset the starting point to the next pump.
If the total remaining petrol at the end is non-negative, return the starting point as the answer.
Consider 'n' carrots numbered from 1 to 'n' and 'k' rabbits. Each rabbit jumps to carrots only at multiples of its respective jumping factor Aj (i.e., Aj, 2Aj, 3Aj, ...), for all ra...
Calculate uneaten carrots after rabbits jump on multiples of their jumping factors.
Iterate through each carrot and check if it is divisible by any rabbit's jumping factor
Keep track of uneaten carrots and return the count at the end
Consider using a set to store eaten carrots for efficient lookup
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.
I appeared for an interview in Jul 2021.
Round duration - 90 Minutes
Round difficulty - Hard
This round had 3 coding questions and the difficulty of the questions ranged from Moderate to Hard level.
You are given a list of points, and currently at point 0, your task is to determine if you can reach the last point N
. At each point i
, you can jump at most JUMP[i]
length forw...
The task is to determine if it is possible to reach the last point in a list of points by jumping a certain distance at each point.
Iterate through the list of points and check if it is possible to reach the last point by jumping the maximum distance at each point.
Keep track of the farthest point that can be reached from the current point.
If the farthest point that can be reached is greater than or equal to the last poi...
You are provided with a Binary Tree consisting of 'N' nodes, where each node holds an integer value. Your objective is to identify and list all nodes that do not possess a...
Identify and list nodes in a Binary Tree without siblings.
Traverse the Binary Tree in level order and keep track of nodes without siblings.
Check if each node has a sibling by comparing with its parent's other child.
Output the values of nodes without siblings in ascending order.
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...
Calculate the minimum number of moves a Knight requires to reach a specified target position on a chessboard.
Implement a function that calculates the minimum number of moves for a Knight to reach the target position on an NxN chessboard.
Consider the possible movements of a Knight on a chessboard (2 squares in one direction and 1 square in a perpendicular direction).
Use breadth-first search (BFS) algorithm to find the s...
Round duration - 60 Minutes
Round difficulty - Medium
This round went for about 50-60 minutes where I had to code two questions related to DSA after discussing their approaches and time and space complexities and then I was asked some questions revolving around OOPS. The interviewer was quite freindly and helped me at some places where I was facing some difficulties.
You are provided with an arithmetic expression in Reverse Polish Notation represented as an array EXP
. Your task is to calculate the value of this expres...
Evaluate arithmetic expression in Reverse Polish Notation using stack.
Use a stack to keep track of operands and perform operations when encountering an operator.
Iterate through the array of strings and push operands onto the stack, perform operation when an operator is encountered.
Handle division using modular division to avoid floating point precision issues.
Return the final result modulo 10^9 + 7 as specified in the ...
You are given a binary search tree (BST) containing N nodes. Additionally, you have references to two nodes, P and Q, within this BST.
Your task is to determine the Lowest Com...
Find the Lowest Common Ancestor (LCA) of two nodes in a Binary Search Tree (BST).
Traverse the BST from the root node to find the LCA of nodes P and Q.
Compare the values of nodes P and Q with the current node's value to determine the LCA.
If both nodes are on the same side of the current node, move to that side; otherwise, the current node is the LCA.
Handle cases where one node is the ancestor of the other node.
Example: ...
Diamond Problem is a common issue in multiple inheritance in C++ where a class inherits from two classes that have a common base class.
Diamond Problem occurs when a class inherits from two classes that have a common base class, leading to ambiguity in accessing members.
It can be resolved in C++ using virtual inheritance, where the common base class is inherited virtually to avoid duplicate copies of base class members.
...
Garbage collection in OOP refers to automatic memory management by deallocating memory of objects no longer in use.
Garbage collection is a process of automatically reclaiming memory occupied by objects that are no longer in use.
It helps prevent memory leaks and ensures efficient memory usage.
Languages like Java, C#, and Python have built-in garbage collection mechanisms.
Garbage collection can be done using different al...
Round duration - 60 Minutes
Round difficulty - Medium
This round consisted of two coding problems which involved proper coding it and explaining each and every aspect and showing the dry run over a few test cases was also necessary.
You are given a list/array of strings representing the contacts in a phone directory. The task is to perform a search based on a query string 'str' and return all contacts...
Implement a phone directory search feature to suggest contacts based on a given prefix query string.
Iterate through the contact list to find contacts with the prefix matching the query string.
Display suggestions as the user types each character of the query.
Handle cases where no suggestions are found for a particular prefix by printing 'No suggestions found'.
Given a binary tree, determine and return its bottom view when viewed from left to right. Assume that each child of a node is positioned at a 45-degree angle from its parent.
N...
Return the bottom view of a binary tree when viewed from left to right.
Traverse the tree in level order and keep track of horizontal distance and depth of each node
For each horizontal distance, update the node in the map if it is deeper than the current node
Return the values of the map in sorted order of horizontal distance
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.
I appeared for an interview in Nov 2020.
Round duration - 95 minutes
Round difficulty - Easy
This round was conducted in Hackerrank portal for a total duration of 95 minutes and was divided into 4 sections.
1st Section : Aptitude Section : 14 questions , 28 minutes
2nd Section : Technical Section : 12 questions , 17 minutes
3rd Section :1 coding Questions : 20 minutes+30 minutes
This Round was Conducted on Hackerrank (Webcam Enabled).
Wong wants to borrow money from Dr. Strange, who insists Wong must win a coin game first. The game involves two players taking turns to remove one coin from either end of a row...
Given an array of coin values, determine the maximum value Wong can obtain by playing a coin game against Dr. Strange.
Wong plays first and can remove one coin from either end of the array on each turn.
The game ends when no coins are left, and the player with the highest total value wins.
Consider different scenarios like having an odd or even number of coins in the array.
Given a sorted array A consisting of N integers, your task is to find the magic index in the given array, where the magic index is defined as an index i such that A[i] = i...
Find the magic index in a sorted array where A[i] = i.
Use binary search to efficiently find the magic index in the sorted array.
Check the middle element of the array and compare it with its index to determine the direction to search.
Repeat the process on the left or right half of the array until the magic index is found or no more elements to search.
Round duration - 120 minutes
Round difficulty - Medium
This was an Online F2F Technical Round conducted on CodePair : Hackerrank. So, Basically You have to Run and Submit ( Pass All Test cases) in the Interview Round also (Like normal Coding Test) in Codepair : Hackerrank & along with that You should have to explain your Code and Approach to the Interviewers.
The Interviewers were helpful and didn't hesitate in giving hints.
Timing - 10:00 A.M to 12:00 P.M
Given a garden that extends along a one-dimensional x-axis from point 0 to point N, your task is to determine the minimum number of taps needed to water the enti...
Find the minimum number of taps needed to water the entire garden using given tap ranges.
Iterate over taps and update the farthest point each tap can reach.
Use a greedy approach to select the tap that can water the farthest point.
If a tap can't water any point, return -1.
Example: For ranges = [3, 4, 1, 1, 0, 0], tap at position 1 can water the entire garden.
Harshit wants to save up money for his first car by depositing money daily in the Ninja bank with a specific increment strategy.
Starting with 1 rupee on the first Monday, th...
Calculate the total money accumulated by Harshit in Ninja bank after N days with a specific increment strategy.
Start with 1 rupee on the first Monday and increase by 1 rupee each day from Tuesday to Sunday.
Each new Monday starts with an additional rupee more than the previous Monday's deposit.
Calculate the total amount of money accumulated after N days for each test case.
Example: For N = 2, total amount is 3 rupees; fo...
Round duration - 120 minutes
Round difficulty - Hard
A lot of Variants based on Constraints were asked in this Round. They will ask you to write the final code for every question before Submitting it(run all test cases) so you won’t get any hints after running test cases in the IDE. ( So don’t Submit your code before dry running it on a lot of Test Cases on pen & paper , they allow to use pen & blank paper at the time of Interviews) .The Interviewers tried to trick in case of time complexities even if you gave the best one. So try to be confident.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and calculate the maximum profit that can be achieved by buying and selling at different points.
Keep track of the maximum profit after the first transaction and the maximum profit after the second transaction.
Return the sum of these t...
You are given the prices of a particular stock over 'N' consecutive days. Your task is to find the maximum profit that can be obtained by completing at most two transact...
Find the maximum profit that can be obtained by completing at most two transactions of buying and selling a stock.
Iterate through the array of stock prices and calculate the maximum profit that can be obtained by completing at most two transactions.
Keep track of the maximum profit that can be obtained by selling the stock on each day after buying it on a previous day.
Consider all possible combinations of two transactio...
Round duration - 30 minutes
Round difficulty - Easy
This was a Telephonic Round (Audio Call). The HR was friendly and asked basic questions.
The timing was 2:00 PM to 2:30 PM.
Consider 'n' carrots numbered from 1 to 'n' and 'k' rabbits. Each rabbit jumps to carrots only at multiples of its respective jumping factor Aj (i.e., Aj, 2Aj, 3Aj, ...), for all ra...
Calculate uneaten carrots by rabbits with specific jumping factors.
Iterate through each carrot and check if any rabbit jumps on it.
Use the jumping factors to determine which carrots will be eaten.
Subtract the eaten carrots from the total to get the uneaten carrots.
Tip 1 : Make sure that you are thorough with CS concepts beforehand.
Tip 2 : Even when you are explaining the approach to a question, try to parallelly think about how you would code it.
Tip 3 : Read the previous interview experiences. It would give a fair idea of the kind of questions one should expect.
Tip 4 : For a company like DE Shaw, practicing medium and hard difficulty level coding questions would be the way to go.
Tip 5 : Practice atleast 200 questions from coding platforms like CodeZen, LeetCode, Interviewbit as they contain common interview questions.
Tip 1 : Mention atleast 1 project and past work experience as it sets good impression.
Tip 2 : Keep your resume up to date for the role you are applying.
Tip 3 : Try to keep your resume of 1 Page.
I appeared for an interview before Apr 2021.
Round duration - 40 minutes
Round difficulty - Medium
The test has 3 sections :
1. Quantitative contains 20 questions. These questions are easy to me. If u practice quant, you can easily solve it.
2. Technical contains 20 questions. Some questions are on C , C++ , java outputs. Remaining are based on DSA. If u Know all the time complexities of algorithms then it is easy . In technical they gave one DSA problem.
3. Essay: They have given one picture and then asked to write an essay by seeing the picture.
Given an undirected graph with 'V' vertices labeled from 0 to V-1 and 'E' edges. Each edge has a weight that represents the distance between two nodes 'X' and 'Y'.
...
Dijkstra's algorithm is used to find the shortest path distances from a source node to all other vertices in a graph.
Dijkstra's algorithm is a greedy algorithm that finds the shortest path from a source node to all other nodes in a graph.
It uses a priority queue to select the node with the smallest distance and relaxes its neighbors.
The algorithm maintains a distance array to keep track of the shortest distances from t...
Round duration - 60 minutes
Round difficulty - Easy
3 persons are there in panel. They are asking questions on basic concepts in subjects and some advanced concepts.
A daemon process is a background process that runs continuously to perform system tasks.
Daemon processes do not have a controlling terminal.
They typically run in the background and perform tasks such as managing hardware devices, network services, or system maintenance.
Examples of daemon processes include cron, sshd, and apache.
Daemon processes are often started during system boot and run until the system is shut down.
System calls provide a way for user-level processes to interact with the operating system kernel.
System calls allow user programs to request services from the operating system.
They provide a secure and controlled way for applications to access system resources.
System calls enable processes to perform tasks such as file operations, network communication, and process management.
Examples of system calls include open(), re...
The select() system call is used in Unix-like operating systems to monitor multiple file descriptors for activity.
select() allows a program to wait for multiple I/O operations to complete on multiple file descriptors.
It takes three sets of file descriptors as arguments - readfds, writefds, and errorfds.
The function will block until an activity is detected on one of the file descriptors or until a timeout occurs.
select(...
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.
Top trending discussions
Some of the top questions asked at the DE Shaw Software Developer interview -
based on 4 interview experiences
Difficulty level
Duration
based on 5 reviews
Rating in categories
Analyst
203
salaries
| ₹8.8 L/yr - ₹30 L/yr |
Senior Analyst
129
salaries
| ₹12.8 L/yr - ₹40.8 L/yr |
Manager
74
salaries
| ₹17.2 L/yr - ₹61 L/yr |
Associate
66
salaries
| ₹8 L/yr - ₹30 L/yr |
Project Lead
58
salaries
| ₹25 L/yr - ₹94 L/yr |
Thomson Reuters
HighRadius
Chetu
EbixCash Limited