Filter interviews by
Use two heaps to efficiently find the median in a stream of numbers.
Maintain two heaps: a max heap for the lower half and a min heap for the upper half.
When a new number arrives, compare it with the max of the lower half (max heap).
If it's smaller, add it to the max heap; otherwise, add it to the min heap.
Rebalance the heaps if their sizes differ by more than one.
The median is the root of the max heap if it has mo...
Designing a HashMap involves understanding key-value storage, collision handling, and resizing strategies.
A HashMap stores data in key-value pairs, allowing for efficient data retrieval.
Hash functions convert keys into hash codes, which determine the index in the array.
Collision handling can be done using chaining (linked lists) or open addressing.
Resizing the HashMap is necessary when the load factor exceeds a ce...
I am currently working on developing a new feature for our company's website to improve user experience.
Researching user feedback and analyzing data to identify areas for improvement
Collaborating with designers and developers to create wireframes and prototypes
Implementing and testing the new feature to ensure functionality and usability
Gathering feedback from users through surveys and usability testing
Iterating o...
Given an array arr
of size N
, determine the minimum number of swaps required to sort the array in ascending order. The array consists of distinct elements only...
The minimum number of swaps required to sort an array of distinct elements in ascending order.
Use a hashmap to store the index of each element in the array.
Iterate through the array and swap elements to their correct positions.
Count the number of swaps needed to sort the array.
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
The first line contains an integer 'T' which denotes the num...
The task is to return the spiral path of elements in a given matrix.
Iterate through the matrix in a spiral path by keeping track of boundaries.
Print elements in the order of top row, right column, bottom row, and left column.
Continue the spiral path until all elements are printed.
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 t...
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 to find the maximum profit that can be achieved by buying and selling stocks at different points.
Keep track of the maximum profit that can be achieved by considering all possible combinations of buy and sell transactions.
Ensure t...
You are playing a coin game with your friend Ninjax. There are N
coins placed in a straight line.
Here are the rules of the game:
1. Each coin has a value associated with...
The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.
Start by considering the base cases where there are only 1 or 2 coins.
Use dynamic programming to keep track of the maximum amount that can be won at each step.
Consider the different scenarios when choosing a coin from either end of the line.
Keep track of the total winnings for both players and choo...
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the l...
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.
If the two pointers meet at any point, there is a cycle in the linked list.
Use Floyd's Cycle Detection Algorithm for efficient detection of cycles in linked lists.
I applied via Approached by Company and was interviewed in Aug 2023. There were 4 interview rounds.
Designing a HashMap involves understanding key-value storage, collision handling, and resizing strategies.
A HashMap stores data in key-value pairs, allowing for efficient data retrieval.
Hash functions convert keys into hash codes, which determine the index in the array.
Collision handling can be done using chaining (linked lists) or open addressing.
Resizing the HashMap is necessary when the load factor exceeds a certain...
I appeared for an interview in Sep 2023.
First round was hacker rank test
Two coding questions and optimisation and other basic DS and OOPS questions
I am currently working on developing a new feature for our company's website to improve user experience.
Researching user feedback and analyzing data to identify areas for improvement
Collaborating with designers and developers to create wireframes and prototypes
Implementing and testing the new feature to ensure functionality and usability
Gathering feedback from users through surveys and usability testing
Iterating on the...
I appeared for an interview before Mar 2024, where I was asked the following questions.
Use two heaps to efficiently find the median in a stream of numbers.
Maintain two heaps: a max heap for the lower half and a min heap for the upper half.
When a new number arrives, compare it with the max of the lower half (max heap).
If it's smaller, add it to the max heap; otherwise, add it to the min heap.
Rebalance the heaps if their sizes differ by more than one.
The median is the root of the max heap if it has more el...
I applied via Recruitment Consulltant and was interviewed before Jun 2023. There were 3 interview rounds.
Leetcode Easy to Medium
I applied via Referral and was interviewed before Apr 2023. There were 4 interview rounds.
Hackerrank coding round asking me to wite a trigger that performed some functionality
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
Online coding assessment having 20 MCQs and 2 coding questions
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
The first line contains an integer 'T' which denotes the nu...
The task is to return the spiral path of elements in a given matrix.
Iterate through the matrix in a spiral path by keeping track of boundaries.
Print elements in the order of top row, right column, bottom row, and left column.
Continue the spiral path until all elements are printed.
Given three non-negative integers X
, Y
, and Z
, determine the longest happy string. A happy string is defined as a string that contains only the letters 'a', 'b', and...
The longest happy string problem involves constructing a string with 'a', 'b', and 'c' without having any three consecutive letters being the same.
Determine the maximum number of times 'a', 'b', and 'c' can appear in the string based on the given input values.
Construct the longest happy string by alternating between 'a', 'b', and 'c' while respecting the constraints.
Return '1' if a correct happy string can be formed, o...
Round duration - 60 minutes
Round difficulty - Easy
The first interview round was fairly easy, and the interviewer was very helpful. It was an hour long interview.
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 to find the maximum profit that can be achieved by buying and selling stocks at different points.
Keep track of the maximum profit that can be achieved by considering all possible combinations of buy and sell transactions.
Ensure that y...
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the ...
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.
If the two pointers meet at any point, there is a cycle in the linked list.
Use Floyd's Cycle Detection Algorithm for efficient detection of cycles in linked lists.
Round duration - 90 minutes
Round difficulty - Medium
It was a long interview, although the interviewer was again very friendly. The main focus was on problem solving in this round too.
Given an array arr
of size N
, determine the minimum number of swaps required to sort the array in ascending order. The array consists of distinct elements onl...
The minimum number of swaps required to sort an array of distinct elements in ascending order.
Use a hashmap to store the index of each element in the array.
Iterate through the array and swap elements to their correct positions.
Count the number of swaps needed to sort the array.
You are playing a coin game with your friend Ninjax. There are N
coins placed in a straight line.
Here are the rules of the game:
1. Each coin has a value associated wit...
The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.
Start by considering the base cases where there are only 1 or 2 coins.
Use dynamic programming to keep track of the maximum amount that can be won at each step.
Consider the different scenarios when choosing a coin from either end of the line.
Keep track of the total winnings for both players and choose th...
Tip 1 : Solve questions in each topic and make sure to note down important concepts for quick review
Tip 2 : Practice specifically for interviews too by solving questions asked previously in top firms
Tip 3 : Pay utmost importance to your projects
Tip 1 : Put links for your projects on resume
Tip 2 : Strictly one page, with only relevant points
Top trending discussions
I appeared for an interview before Jan 2021.
Round duration - 120 Minutes
Round difficulty - Medium
This was an online Coding+MCQ round. Both the coding questions were related to DP and were of Medium to Hard Difficulty.The MCQ's were of easy-medium level but one has to be fast in order to complete the section in the given time frame.
You are given an array ARR
of N integers. Your task is to perform operations on this array until it becomes empty, and maximize the sum of selected elements. In each operatio...
Given an array, select elements to maximize sum by removing adjacent elements.
Iterate through the array and keep track of the count of each element.
Select the element with the highest count first, then remove adjacent elements.
Repeat the process until the array is empty and sum the selected elements.
Imagine Ninja is tackling a puzzle during his long summer vacation. He has two arrays of integers, each with lengths 'N' and 'M'. Ninja's task is to dete...
Find the length of the longest common prime subsequence between two arrays of integers.
Iterate through both arrays to find prime numbers
Use a set to keep track of common prime numbers
Return the size of the set as the length of the longest common prime subsequence
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 Algorithmic questions wherein I was supposed to code both the problems after discussing their approaches and respective time and space complexities . After that , I was grilled on some OOPS concepts related to C++.
For a given singly linked list, identify if a loop exists and remove it, adjusting the linked list in place. Return the modified linked list.
A...
Detect and remove loop in a singly linked list in place with O(n) time complexity and O(1) space complexity.
Use Floyd's Cycle Detection Algorithm to identify the loop in the linked list.
Once the loop is detected, use two pointers to find the start of the loop.
Adjust the pointers to remove the loop and return the modified linked list.
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Implement a stack using two queues to store integer values with specified functions.
Create a stack class with two queue data members.
Implement push(data), pop(), top(), size(), and isEmpty() functions.
Use one queue for pushing elements and another for temporary storage during operations.
Ensure proper handling of edge cases such as empty stack.
Example: If input is Q = 5, 1 42, 2, 3, 1 17, the output should be 42, -1, 17...
Vtable and VPTR are used in C++ for implementing polymorphism through virtual functions.
Vtable (Virtual Table) is a table of function pointers used to implement dynamic dispatch in C++ for virtual functions.
VPTR (Virtual Pointer) is a pointer that points to the Vtable of an object, allowing dynamic binding of virtual functions at runtime.
Vtable is created for each class that has virtual functions, containing pointers t...
Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.
Friend functions are declared inside a class with the keyword 'friend'.
They can access private and protected members of the class.
They are not member functions of the class, but have the same access rights as member functions.
Example: friend void displayDetails(Student);
Round duration - 60 minutes
Round difficulty - Medium
This round had 3 preety good questions related to DSA and some questions revolving around Memory Management and Operating Systems.
Given a binary search tree (BST) with 'N' nodes, find the predecessor and successor of a given 'KEY' node in the BST.
The predecessor o...
Find predecessor and successor of a given node in a binary search tree (BST).
Predecessor is the node visited just before the given node in an inorder traversal.
Successor is the node visited immediately after the given node in an inorder traversal.
Return -1 if predecessor or successor does not exist.
Implement inorder traversal to find predecessor and successor.
You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or tw...
The problem involves counting the number of distinct ways to climb N stairs by taking 1 or 2 steps at a time.
Use dynamic programming to solve the problem efficiently.
The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.
Handle base cases for N=0 and N=1 separately.
Apply modulo operation to avoid overflow while calculating the result.
Consider using me...
You are given an array 'A' of length 'N'. You must choose an element from any index in this array and delete it. After deleting the element, you will obtain a new array of le...
Given an array, find the number of 'good' arrays that can be formed by deleting one element.
Iterate through each element in the array and check if deleting it results in a 'good' array
Keep track of the sum of elements at odd and even indices to determine if the array is 'good'
Return the count of 'good' arrays
Memory protection in operating systems prevents one process from accessing or modifying the memory of another process.
Memory protection ensures that each process has its own isolated memory space.
It prevents unauthorized access to memory locations, improving system stability and security.
Operating systems use techniques like virtual memory and access control lists to enforce memory protection.
Examples include segmentat...
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.
based on 6 interview experiences
Difficulty level
Duration
based on 24 reviews
Rating in categories
Technical Support Engineer
957
salaries
| ₹15 L/yr - ₹26 L/yr |
Technical Consultant
425
salaries
| ₹17.6 L/yr - ₹30 L/yr |
Member Technical Staff
346
salaries
| ₹31.5 L/yr - ₹57.3 L/yr |
Senior Technical Consultant
339
salaries
| ₹27 L/yr - ₹46.2 L/yr |
Senior Member of Technical Staff
314
salaries
| ₹48 L/yr - ₹86.8 L/yr |
SAP
Zoho
Oracle
Adobe