Filter interviews by
Given a binary tree with 'N' nodes, determine the size of the largest subtree that is also a BST (Binary Search Tree).
The first line contains an integer 'T', represent...
The problem involves finding the size of the largest subtree that is also a Binary Search Tree in a given binary tree.
Traverse the binary tree in a bottom-up manner to check if each subtree is a BST.
Keep track of the size of the largest BST subtree encountered so far.
Use recursion to solve the problem efficiently.
Consider edge cases like empty tree or single node tree.
Example: For input 1 2 3 4 -1 5 6 -1 7 -1 -1 -...
Given a singly linked list of integers, your task is to return the head of the reversed linked list.
The given linked list is 1 -> 2 -> 3 ->...
To reverse a singly linked list of integers, return the head of the reversed linked list.
Iterate through the linked list, reversing the pointers to point to the previous node instead of the next node.
Keep track of the previous, current, and next nodes while traversing the list.
Update the head of the reversed linked list to be the last element of the original list.
Ninja has been tasked with implementing a priority queue using a heap data structure. However, he is currently busy preparing for a tournament and has requested you...
Implement a priority queue using a heap data structure by completing the provided functions: push(), pop(), getMaxElement(), and isEmpty().
Understand the operations: push() to insert element, pop() to remove largest element, getMaxElement() to return largest element, and isEmpty() to check if queue is empty.
Implement a heap data structure to maintain the priority queue.
Handle different types of queries based on th...
Design a system similar to Splitwise and suggest three features for improvement.
Implement a real-time notification system for updates on shared expenses
Integrate a feature for automatic currency conversion for international transactions
Enhance the user interface with data visualization tools for better expense tracking
You are provided with a positive integer N. Your goal is to determine the smallest number whose factorial has at least N trailing zeros.
N = 1
...
Find the smallest number whose factorial has at least N trailing zeros.
Calculate the number of 5's in the prime factorization of the factorial to determine the trailing zeros.
Use binary search to find the smallest number with at least N trailing zeros.
Consider edge cases like N = 0 or N = 1 for factorial trailing zeros problem.
Given three integers X
, Y
, and Z
, calculate the sum of all numbers that can be formed using the digits 3, 4, and 5. Each digit can be used up to a maximum of X
, Y
, and Z
t...
Calculate the sum of all numbers that can be formed using the digits 3, 4, and 5 with given constraints.
Iterate through all possible combinations of 3, 4, and 5 based on the given constraints.
Calculate the sum of each combination and add them up.
Return the final sum modulo 10^9 + 7.
Given a Weighted Directed Acyclic Graph (DAG) comprising 'N' nodes and 'E' directed edges, where nodes are numbered from 0 to N-1, and a source node 'Src'. ...
The task is to find the longest distances from a source node to all nodes in a weighted directed acyclic graph.
Implement a function that takes the number of nodes, edges, source node, and edge weights as input.
Use a topological sorting algorithm to traverse the graph and calculate the longest distances.
Return an array of integers where each element represents the longest distance from the source node to the corres...
I appeared for an interview before May 2021.
Round duration - 60 minutes
Round difficulty - Easy
Timing - flexible 12 hours window to take the test. (9AM - 9PM)
Test was proctored
Given three integers X
, Y
, and Z
, calculate the sum of all numbers that can be formed using the digits 3, 4, and 5. Each digit can be used up to a maximum of X
, Y
, and Z
...
Calculate the sum of all numbers that can be formed using the digits 3, 4, and 5 with given constraints.
Iterate through all possible combinations of 3, 4, and 5 based on the given constraints.
Calculate the sum of each combination and add them up.
Return the final sum modulo 10^9 + 7.
Given a Weighted Directed Acyclic Graph (DAG) comprising 'N' nodes and 'E' directed edges, where nodes are numbered from 0 to N-1, and a source node 'Src'....
The task is to find the longest distances from a source node to all nodes in a weighted directed acyclic graph.
Implement a function that takes the number of nodes, edges, source node, and edge weights as input.
Use a topological sorting algorithm to traverse the graph and calculate the longest distances.
Return an array of integers where each element represents the longest distance from the source node to the correspondi...
Round duration - 40 minutes
Round difficulty - Easy
Timing - 9:00 AM - 9:40 AM
You are provided with a positive integer N. Your goal is to determine the smallest number whose factorial has at least N trailing zeros.
N = 1
Find the smallest number whose factorial has at least N trailing zeros.
Calculate the number of 5's in the prime factorization of the factorial to determine the trailing zeros.
Use binary search to find the smallest number with at least N trailing zeros.
Consider edge cases like N = 0 or N = 1 for factorial trailing zeros problem.
Given a singly linked list of integers, your task is to return the head of the reversed linked list.
The given linked list is 1 -> 2 -> 3 -&g...
To reverse a singly linked list of integers, return the head of the reversed linked list.
Iterate through the linked list, reversing the pointers to point to the previous node instead of the next node.
Keep track of the previous, current, and next nodes while traversing the list.
Update the head of the reversed linked list to be the last element of the original list.
Round duration - 40 minutes
Round difficulty - Easy
Timing - 12:00 Pm to 12:40 PM
Ninja has been tasked with implementing a priority queue using a heap data structure. However, he is currently busy preparing for a tournament and has requested yo...
Implement a priority queue using a heap data structure by completing the provided functions: push(), pop(), getMaxElement(), and isEmpty().
Understand the operations: push() to insert element, pop() to remove largest element, getMaxElement() to return largest element, and isEmpty() to check if queue is empty.
Implement a heap data structure to maintain the priority queue.
Handle different types of queries based on the inp...
Given a binary tree with 'N' nodes, determine the size of the largest subtree that is also a BST (Binary Search Tree).
The first line contains an integer 'T', represen...
The problem involves finding the size of the largest subtree that is also a Binary Search Tree in a given binary tree.
Traverse the binary tree in a bottom-up manner to check if each subtree is a BST.
Keep track of the size of the largest BST subtree encountered so far.
Use recursion to solve the problem efficiently.
Consider edge cases like empty tree or single node tree.
Example: For input 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 ...
Round duration - 40 minutes
Round difficulty - Medium
Timing - 6:00 PM - 6:30 PM
Design a system similar to Splitwise and suggest three features for improvement.
Implement a real-time notification system for updates on shared expenses
Integrate a feature for automatic currency conversion for international transactions
Enhance the user interface with data visualization tools for better expense tracking
Tip 1 : For fresher role, System design is not very important.
Tip 2 : Do at least 1-2 good quality projects.
Tip 1 : Have 1-2 good engaging projects in resume.
Tip 2 : Internships are helpful.
Top trending discussions
I applied via Monster and was interviewed before Apr 2020. There was 1 interview round.
A generic swap function swaps two values of any data type.
The function should take two parameters of any data type.
Use a temporary variable to store the value of one parameter.
Assign the value of the second parameter to the first parameter.
Assign the value of the temporary variable to the second parameter.
Search for an element in a rotated sorted linked list.
Find the pivot point where the list is rotated.
Divide the list into two sublists based on the pivot point.
Perform binary search on the appropriate sublist.
Handle edge cases such as empty list and list with only one element.
Search an element in a rotated sorted array
Find the pivot point where the array is rotated
Divide the array into two sub-arrays based on pivot point
Perform binary search on the appropriate sub-array
Repeat until element is found or sub-array size is 1
Given a Sudoku board, find possible numbers for an empty cell.
Iterate through empty cells and check possible numbers using row, column, and box constraints.
Use a set to keep track of possible numbers for each empty cell.
Return the set of possible numbers for the given empty cell.
Find integer average of 4 unsigned integers without typecasting
Add all the integers and divide by 4
Use bit shifting to divide by 4
Handle overflow by using long long data type
Use unsigned int data type for input
Code to identify 32 bit or 64 bit architecture of a processor
Check if the operating system is 32 bit or 64 bit
If OS is 32 bit, processor is 32 bit
If OS is 64 bit, check if processor supports 64 bit architecture
Use CPUID instruction to check if processor supports 64 bit architecture
Convert binary number to base 64 integer
Divide the binary number into groups of 6 bits
Convert each group of 6 bits to decimal
Map the decimal value to the corresponding base 64 character
Concatenate the base 64 characters to form the final integer
Creating test cases for random scenarios ensures software reliability and robustness through diverse input validation.
Identify edge cases: Test with minimum and maximum input values, e.g., an empty array vs. a large array.
Use random data: Generate random inputs to simulate real-world usage, e.g., random user names or passwords.
Test invalid inputs: Ensure the system handles unexpected inputs gracefully, e.g., negative n...
I appeared for an interview before Mar 2021.
Round duration - 45 minutes
Round difficulty - Medium
Technical Interview round with questions on DSA.
You are given a string of length N
. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading o...
Reverse words in a string while handling leading, trailing, and multiple spaces.
Split the input string by spaces to get individual words
Reverse the order of the words
Join the reversed words with a single space in between
Handle leading, trailing, and multiple spaces appropriately
You are given a stack of integers. Your task is to reverse the stack using recursion without using any extra space other than the internal stack space used due to recursion...
Reverse a stack using recursion without using any extra space other than the internal stack space.
Use recursion to pop all elements from the original stack and store them in function call stack.
Once the stack is empty, push the elements back in reverse order.
Base case of recursion should be when the original stack is empty.
Round duration - 45 minutes
Round difficulty - Medium
Technical Interview round with questions on DSA.
Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mirror of a bin...
Convert a binary tree to its mirror tree by interchanging left and right children of all non-leaf nodes.
Traverse the binary tree in a recursive manner.
Swap the left and right children of each non-leaf node.
Continue this process until all nodes have been processed.
You are given a singly linked list with 'N' nodes, each containing integer data, and an integer 'K'. Your goal is to remove the 'K'th node counting from the end of ...
Remove the Kth node from the end of a singly linked list.
Use two pointers approach to find the Kth node from the end.
Handle edge cases like removing the head node or removing the last node.
Update the pointers to remove the Kth node and reconnect the list.
Round duration - 30 minutes
Round difficulty - Easy
Typical Managerial round.
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.
Technical Support Engineer
983
salaries
| ₹14.3 L/yr - ₹26 L/yr |
Technical Consultant
408
salaries
| ₹17.6 L/yr - ₹29 L/yr |
Member Technical Staff
341
salaries
| ₹31.2 L/yr - ₹57.3 L/yr |
Senior Technical Consultant
315
salaries
| ₹23 L/yr - ₹46.2 L/yr |
Senior Member of Technical Staff
312
salaries
| ₹48 L/yr - ₹81.1 L/yr |
SAP
Zoho
Oracle
Adobe