Filter interviews by
I appeared for an interview in May 2021.
Round duration - 90 minutes
Round difficulty - Hard
Timing was 4 PM. Platform was good. Overall a good experience.
Ninja is trapped in a prison and plans to escape through its gate. The gate consists of horizontal and vertical bars spaced one unit apart, creating holes of area 1 * 1 between th...
Find the area of the largest hole in a gate after removing certain bars.
Iterate through all possible combinations of removed bars to find the largest hole area.
Calculate the area of each hole after removing bars and keep track of the maximum area.
Consider both horizontal and vertical bars when calculating the area of the hole.
Given an array of integers arr
and an integer limit
, your task is to find the smallest integer divisor such that dividing all elements of the array by this divisor and ro...
The task is to find the smallest integer divisor such that dividing all elements of the array by this divisor and rounding up to the nearest integer yields a sum less than or equal to a given limit.
Iterate through possible divisors starting from 1 up to the maximum element in the array.
For each divisor, calculate the sum of rounded up divisions of array elements and check if it is less than or equal to the limit.
Return...
Tip 1 : Practice DS algo questions.
Tip 2 : Have some projects.
Tip 1 : Keep it short.
Tip 2 : Do not put false things.
I appeared for an interview in May 2021.
Round duration - 90 minutes
Round difficulty - Medium
Timing was 4 pm. Platform was really great .
Ninja is trapped in a prison and plans to escape through its gate. The gate consists of horizontal and vertical bars spaced one unit apart, creating holes of area 1 * 1 between th...
Find the area of the largest hole in a gate after removing certain bars.
Iterate through the removable horizontal and vertical bars to find the largest hole area.
Keep track of the maximum hole area as bars are removed.
Consider all possible combinations of removed bars to find the largest hole area.
Use dynamic programming or backtracking to efficiently find the solution.
Given an array of integers arr
and an integer limit
, your task is to find the smallest integer divisor such that dividing all elements of the array by this divisor and ro...
The task is to find the smallest integer divisor such that dividing all elements of the array by this divisor and rounding up to the nearest integer yields a sum less than or equal to the given limit.
Iterate through possible divisors starting from 1 up to the maximum element in the array.
For each divisor, calculate the sum of rounded up divisions of array elements.
Return the smallest divisor that satisfies the conditio
Tip 1 : Practice data structure
Tip 2 : Atleast have one hands on project
Tip 1 : Be honest while adding things in assume
Tip 2 : Add only if you have good skills in particular subject
Top trending discussions
I appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Medium
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to keep track of the longest increasing subsequence ending at each element.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the ar...
Ninja has a string of characters from 'A' to 'Z', encoded using their numeric values (A=1, B=2, ..., Z=26). The encoded string is given as a sequence of digits (SEQ). The task is t...
The task is to determine the number of possible ways to decode a sequence of digits back into a string of characters from 'A' to 'Z'.
Use dynamic programming to keep track of the number of ways to decode the sequence at each position.
Consider different cases when decoding the sequence, such as single digit decoding and double digit decoding.
Handle edge cases like '0' and '00' appropriately.
Return the final count modulo
Round duration - 60 minutes
Round difficulty - Medium
Given a binary tree with 'N' nodes, determine if all the leaf nodes are situated at the same level. Return true
if all the leaf nodes are at the same level, otherwis...
Check if all leaf nodes in a binary tree are at the same level.
Traverse the binary tree and keep track of the level of each leaf node.
Compare the levels of all leaf nodes at the end to determine if they are at the same level.
Use a queue for level order traversal of the binary tree.
Given an array of integers, determine the maximum sum of a subsequence without choosing adjacent elements in the original array.
The first line consists of an...
Find the maximum sum of a subsequence without choosing adjacent elements in an array.
Use dynamic programming to keep track of the maximum sum of non-adjacent elements at each index.
At each index, the maximum sum is either the sum of the current element and the element two positions back, or the sum at the previous index.
Iterate through the array and update the maximum sum at each index accordingly.
Return the maximum su
Round duration - 60 minutes
Round difficulty - Medium
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Use a combination of hashmap and doubly linked list to implement the LRU cache.
Keep track of the least recently used item and update it accordingly when inserting new items.
Ensure to handle the capacity constraint by evicting the least recently used item when the cache is full.
Implement get(key) and put...
Mutex is used for exclusive access to a resource by only one thread at a time, while Semaphores can allow multiple threads to access a resource simultaneously.
Mutex is binary and can be locked by only one thread at a time, while Semaphores can have a count greater than one.
Mutex is used for protecting critical sections of code, while Semaphores can be used for controlling access to a pool of resources.
Mutex is simpler ...
Use SQL Joins to find the number of employees in each department.
Use a JOIN statement to combine the employee and department tables based on the department ID.
Group the results by department ID and use COUNT() function to find the number of employees in each department.
Example: SELECT department.department_id, COUNT(employee.employee_id) AS num_employees FROM department JOIN employee ON department.department_id = emplo...
Tip 1 : Work on communicating effectively, give a lot of mock interviews. There is no point studying so hard if your thoughts or solution don't reach the interviewer.
Tip 2 : Practice variety of questions. 50 questions of different topics, patterns are better that 50 questions done for same topic.
Tip 3 : Try to think of solution by different approaches, this will expand your horizon by doing less questions.
Tip 1 : Don't make a fancy resume, keep it simple, you can use Latex templates from overleaf.com.
Tip 2 : Make it short and crisp. Resume should not be more than 1 page. And don't write anything you're not confident about. For experienced people, read the JD first and design your resume accordingly.
I appeared for an interview in Dec 2020.
Round duration - 90 minutes
Round difficulty - Easy
Given a directed graph, you need to determine whether or not the graph contains a cycle.
Your function should return true
if there is at least one cycle in the graph; ...
Detect cycles in a directed graph and return true if a cycle exists, false otherwise.
Use Depth First Search (DFS) to detect cycles in the graph.
Maintain a visited array to keep track of visited vertices and a recursion stack to keep track of vertices in the current DFS traversal.
If a vertex is visited and is present in the recursion stack, then a cycle exists.
Example: For the input graph with vertices 0, 1, 2 and edges...
Given a permutation of ‘N’ integers, rearrange them to generate the lexicographically next greater permutation. A sequence is a permutation if it contains all integers f...
The problem involves rearranging a permutation of integers to generate the lexicographically next greater permutation.
Understand the concept of lexicographically next greater permutation.
Implement a function to find the next greater permutation.
Handle cases where no greater permutation exists by returning the smallest permutation.
Round duration - 60 minutes
Round difficulty - Easy
Given a binary tree with N
nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true
; otherwise, return false
.
A binary search tree (BST)...
Validate if a binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Recursively check if both the left and right subtrees are also binary search trees.
Tip 1 : Prepare Data Structures
Tip 2 : Solve atleast 300-400 problems
Tip 3 : Prepare computer science subjects for solving MCQ's
Tip 1 : Projects around oops would be great
Tip 2 : Be confident about everything you write
I appeared for an interview in Nov 2020.
Round duration - 90 minutes
Round difficulty - Medium
The test was scheduled at 2:30 PM, IST. The test was conducted online, due to the ongoing pandemic situation. Webcam was required to be switched on during the complete duration of the test. I had solved 2/2 coding questions with all test cases successfully passing. Out of the 10 MCQ questions, I had done 6. Around 90 students sat for the online coding round, 19 were shortlisted for the interview. Those who had solved both coding questions were called for interview.
Prateek is a kindergarten teacher with a mission to distribute candies to students based on their performance. Each student must get at least one candy, and if two s...
The task is to distribute candies to students based on their performance while minimizing the total candies distributed.
Iterate through the array of student ratings to determine the minimum number of candies required.
Assign each student at least one candy.
Adjust the number of candies based on the ratings of adjacent students to minimize the total candies distributed.
Example: For ratings [5, 8, 1, 5, 9, 4], the optimal ...
Ninja Yuki wants to purchase ninja blades at the Spring Fair in his village. Initially, he has 0 blades, and his goal is to buy 'N' blades. The merchant...
Calculate the minimum cost to acquire a specific number of ninja blades using a given pricing mechanism.
Iterate through each test case to determine the minimum cost needed to acquire the desired number of blades.
Consider the cost of adding 1 blade versus doubling the current number of blades to reach the target quantity.
Keep track of the total cost as blades are acquired based on the pricing mechanism.
Return the minimu
Round duration - 60 minutes
Round difficulty - Medium
This was a pure DSA based round. Two questions were asked in this round. The interviewer was quite good, and helped in between.
Given a string A
consisting of lowercase English letters, determine the first non-repeating character at each point in the stream of characters.
Given a string of lowercase English letters, find the first non-repeating character at each point in the stream.
Iterate through the characters in the string and maintain a count of each character.
Use a queue to keep track of the order of characters encountered.
For each character, check if it is the first non-repeating character by looking at its count in the map.
If a character's count is 1, it is the first non-repeatin...
Given a 2-dimensional boolean matrix mat
of size N x M, your task is to modify the matrix such that if any element is 1, set its entire row and column to 1. Specifi...
Modify a boolean matrix such that if any element is 1, set its entire row and column to 1 in-place.
Iterate through the matrix to find elements with value 1.
Use additional arrays to keep track of rows and columns to be modified.
Update the matrix in-place based on the identified rows and columns.
Round duration - 75 minutes
Round difficulty - Medium
This round was also again focused on DSA. Two interviewers were present. This round was very extensive and everything was asked in depth as well as they asked to write the codes as well for all the questions. I was also asked to explain my projects, they were based on ML. Many aspects of OOPs, POP, memory allocation was asked as well.
Given an array ARR
of size N
, determine the maximum sum of i * ARR[i]
possible through any number of rotations. Both left and right rotations are allowed, and can...
Find maximum sum of i * ARR[i] possible through any number of rotations in an array.
Calculate the sum of i * ARR[i] for each rotation and find the maximum sum.
Consider both left and right rotations.
Optimize the solution to avoid redundant calculations.
Handle edge cases like empty array or single element array.
Given an arbitrary binary tree consisting of 'N' nodes numbered from 1 to 'N'. Each node is associated with a positive integer value. Your task is to ca...
Calculate the average of node values at each level in a binary tree.
Traverse the binary tree level by level using BFS
Calculate the sum of node values at each level and divide by the number of nodes at that level
Print the floor value of the average for each level
Tip 1 : Primary skill to be developed is problem solving, i.e proficient in data structures and algorithms.
Tip 2 : After this, practice competitive programming, start giving contests, this will make you faster.
Tip 3 : Then take any technology, e.g., machine learning, web development etc., make few but good projects using these technologies.
Tip 1 : Make it short, 1-2 pages max. Only mention those projects that you know the best.
Tip 2 : While mentioning projects, do mention numbers in them, like what was the accuracy(in case of ML projects).
I appeared for an interview in Jan 2021.
Round duration - 90 minutes
Round difficulty - Hard
Timing was 11 am. Platform was quite well.
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Recursively try moving in all directions (up, down, left, right) until reaching the destination.
Add the path to the result list when the destination is reached.
Sort the result list alphabetically before returning.
You are given an NxM matrix consisting of '0's and '1's. A '1' signifies that the cell is accessible, whereas a '0' indicates that the cell is blocked. Your task is to compute ...
Find the minimum cost to reach a destination in a matrix with specified rules.
Use BFS traversal to explore all possible paths from the starting point to the destination.
Keep track of the cost incurred at each cell and update it accordingly.
Return the minimum cost to reach the destination or -1 if unreachable.
Tip 1 : Practice data structure based questions.
Tip 2 : OOPS is very important.
Tip 3 : Prepare OS and DBMS for mcq.:
Tip 1 : Have some projects on resume.
Tip 2 : Keep it short.
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
Coding question of medium level difficulty, from DP.
18 MCQs were core CSE related concepts e.g: OS, OOPs, DBMS, Networking
Time was 90 minutes.
You are given an NxM matrix consisting of '0's and '1's. A '1' signifies that the cell is accessible, whereas a '0' indicates that the cell is blocked. Your task is to compute ...
Find the minimum cost to reach a destination in a matrix with blocked cells.
Use Breadth First Search (BFS) algorithm to explore all possible paths from the starting point to the destination.
Keep track of the cost incurred at each cell and update it as you move through the matrix.
Return the minimum cost to reach the destination or -1 if it is unreachable.
Round duration - 30 minutes
Round difficulty - Medium
It was an one-to-one interview. It checks your problem solving ability and a few OOPs, OS, DBMS etc concepts. Coding questions were related to array, queue and DP.
Given an integer array/list ARR
of length 'N', determine if it is possible to form at least one non-degenerate triangle using the values of the array as the sides o...
Determine if it is possible to form a non-degenerate triangle using array elements as sides.
Check if the sum of any two sides is greater than the third side for all combinations of sides.
If the above condition is met for any combination, return true; otherwise, return false.
You are given an array/list of integers. The task is to return the maximum sum of a subsequence such that no two elements in the subsequence are adjacent in the given ...
Find the maximum sum of non-adjacent elements in an array.
Use dynamic programming to keep track of the maximum sum at each index, considering whether to include the current element or not.
At each index, the maximum sum can be either the sum excluding the current element or the sum including the current element but excluding the previous element.
Iterate through the array and update the maximum sum accordingly.
Example: F...
Round duration - 45 minutes
Round difficulty - Easy
It was also a problem solving round. However after coding questions, they also asked CSE conceptual questions.
Convert a given binary tree into its sum tree. In a sum tree, every node's value is replaced with the sum of its immediate children's values. Leaf nodes are set to 0. Finally, return th...
Convert a binary tree into a sum tree by replacing each node's value with the sum of its children's values. Return preorder traversal.
Traverse the tree in a bottom-up manner, starting from the leaf nodes.
For each node, update its value to the sum of its children's values.
Set leaf nodes to 0.
Return the preorder traversal of the modified tree.
Core concepts of indexing in DBMS include types of indexes, benefits of indexing, and factors affecting index performance.
Types of indexes: B-tree, Hash, Bitmap, etc.
Benefits of indexing: Faster data retrieval, improved query performance, reduced disk I/O.
Factors affecting index performance: Selectivity, clustering factor, index fragmentation.
Examples: Creating an index on a column in a table to speed up search queries
Tip 1 : Strengthen your coding, algorithms. This is one most important thing for OYO. Practice Graph, tree, DP, greedy, recursion, data structures questions.
Tip 2 : OS, DBMS concepts will give you an edge over others. Like serialisation, index, deadlock, semaphore
Tip 3 : Only mention those projects in your resume which you are very clear about. They don't ask for detailed explanation, just an overall idea about your projects will increase your chances
Tip 1 : Mention college projects wisely. No need to mention fancy projects. Any project that you can describe to the interviewer will be a best solution
Tip 2 : Neat & clean resume with your skills, technical stacks that you mastered. That's all. They don't require you to be very active in extra-curricular activities, and these things will not give you any advantage.
Tip 3 : Keep it of single page
posted on 7 Apr 2021
posted on 9 Sep 2020
I applied via Naukri.com and was interviewed in Aug 2020. There were 4 interview rounds.
Member Technical Staff
69
salaries
| ₹6.5 L/yr - ₹21.6 L/yr |
Senior Member of Technical Staff
49
salaries
| ₹11 L/yr - ₹29 L/yr |
Software Developer
20
salaries
| ₹7 L/yr - ₹18 L/yr |
Product Manager
20
salaries
| ₹16 L/yr - ₹44 L/yr |
Software Engineer
17
salaries
| ₹6 L/yr - ₹21 L/yr |
Mahindra Logistics
Oyo Rooms
Whitehat jr
CMS IT Services