Filter interviews by
Implement an API to limit user access to a function a specified number of times per minute.
Use a data structure (like a dictionary) to track user access timestamps.
Implement a function to check the number of accesses in the last minute.
If the count exceeds the limit, deny access; otherwise, allow it.
Example: If limit is 5, and user accesses 5 times in a minute, deny the 6th access.
Consider using a sliding window a...
Find the longest increasing subsequence in an array
Use dynamic programming to solve this problem
Iterate through the array and keep track of the longest increasing subsequence ending at each index
Time complexity can be optimized to O(n log n) using binary search
In this problem, Ninja is provided with two lines on a 2D plane. The first line 'AB' is determined by two points A and B. The second line 'PQ' is determined by two poin...
Calculate the intersection point of two lines on a 2D plane with precision up to six decimal places.
Parse input integers for each test case
Implement line intersection algorithm
Handle precision up to six decimal places in output
Return -1.000000 -1.000000 if lines do not intersect
Given a connected directed acyclic graph with 'N' nodes and 'N-1' edges, where each pair of nodes is connected by exactly one edge, you can perform the following operation a...
The task is to implement a function that reorders edges in a directed acyclic graph to ensure a directed path exists from every node to node 0 with minimum edge reversals.
Iterate through the graph to find the shortest path from each node to node 0.
Determine the number of edge reversals needed to create a directed path from each node to node 0.
Implement a function that performs the edge reversal operation efficient...
Ninja has started a new startup with a single conference room available for meetings. Given an array/list MEETINGS
of consecutive appointment requests, Ninja must d...
Find the maximum total booked minutes possible in a conference room for given meeting durations with a 15-minute break between meetings.
Iterate through the list of meeting durations and calculate the maximum total booked minutes by considering the 15-minute break constraint.
Keep track of the total booked minutes and skip consecutive meetings that violate the break constraint.
Return the maximum total booked minutes...
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calculat...
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the ce...
Hackerrank 3 questions were given of binary search dp and a math coding question
I applied via Campus Placement
3 coding question in 1:30 hr
2 medium + 1 hard
1- greedy
2- binary search, prefix sum
3- dp (too hard)
I applied via Campus Placement and was interviewed before May 2023. There were 3 interview rounds.
Was conducted on hackerrank
3 questions
2 lc hard
1 lc medium
Find the longest increasing subsequence in an array
Use dynamic programming to solve this problem
Iterate through the array and keep track of the longest increasing subsequence ending at each index
Time complexity can be optimized to O(n log n) using binary search
I applied via Campus Placement and was interviewed before Oct 2022. There were 4 interview rounds.
3 Questions :
1 hard, 1 medium, 1 easy
Implement an API to limit user access to a function a specified number of times per minute.
Use a data structure (like a dictionary) to track user access timestamps.
Implement a function to check the number of accesses in the last minute.
If the count exceeds the limit, deny access; otherwise, allow it.
Example: If limit is 5, and user accesses 5 times in a minute, deny the 6th access.
Consider using a sliding window algori...
I appeared for an interview in Dec 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round had 2 coding problems and we had to code it on hackerearth only.
The use of Outside IDE was forbidden.
The timing of test was 12:00 PM to 1:30 PM.
Ninja has started a new startup with a single conference room available for meetings. Given an array/list MEETINGS
of consecutive appointment requests, Ninja must ...
Find the maximum total booked minutes possible in a conference room for given meeting durations with a 15-minute break between meetings.
Iterate through the list of meeting durations and calculate the maximum total booked minutes by considering the 15-minute break constraint.
Keep track of the total booked minutes and skip consecutive meetings that violate the break constraint.
Return the maximum total booked minutes for ...
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the cell to...
Round duration - 90 minutes
Round difficulty - Medium
This round was coding round with discussion .
The interviewer tried to trick the questions and wanted to test how we respond if something is asked out of preparation.
The code we ran on Google Docs was checked on Online IDE if it ran for sample inputs.
Timing : 12:00 PM to 1:30 PM
Given a connected directed acyclic graph with 'N' nodes and 'N-1' edges, where each pair of nodes is connected by exactly one edge, you can perform the following operation ...
The task is to implement a function that reorders edges in a directed acyclic graph to ensure a directed path exists from every node to node 0 with minimum edge reversals.
Iterate through the graph to find the shortest path from each node to node 0.
Determine the number of edge reversals needed to create a directed path from each node to node 0.
Implement a function that performs the edge reversal operation efficiently.
Co...
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, f...
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) algorithm to find the shortest path from the starting cell to the last cell.
Maintain a queue to keep track of the cells to be visited next.
Consider the effect of snakes and ladders on the movement of the player.
Handle the boundary conditions and constraints specified in the problem stateme...
Round duration - 75 minutes
Round difficulty - Hard
This was a problem solving round and lasted for 75 minutes. The interviewer gave me a very complicated question.
The round was held on Google Meet and I was supposed to tell him the approach and write code on shared Google Docs.
Then it was followed with some HR questions.
In this problem, Ninja is provided with two lines on a 2D plane. The first line 'AB' is determined by two points A and B. The second line 'PQ' is determined by two poi...
Calculate the intersection point of two lines on a 2D plane with precision up to six decimal places.
Parse input integers for each test case
Implement line intersection algorithm
Handle precision up to six decimal places in output
Return -1.000000 -1.000000 if lines do not intersect
Tip 1 : Topics from Coding Ninjas of Course Competitive Programming. Practice atleast one question everyday from sites like Leetcode,Interviewbit and also took part in Codeforces Contest.
Tip 2 : Though Data Structure is the base for any tech interview, one must know some other subjects as well like Operating System, Networking, and Database Management System for which I took help from Coding Ninja’s notes and from GeeksforGeeks. Along with this stuff, read about puzzles on GeeksForGeeks. Overall, Coding Ninjas & Geeks For Geeks have a big hand in making me crack this interview.
Tip 1 : Keep your resume up to date and mention 2-3 good level projects which will give a good impression to the interviewer .
Tip 2 : Don't put false things on the resume.
Top trending discussions
I applied via Company Website and was interviewed before Oct 2019. There were 4 interview rounds.
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.
based on 4 interview experiences
Difficulty level
Duration
based on 3 reviews
Rating in categories
Software Engineer
262
salaries
| ₹32.1 L/yr - ₹57.4 L/yr |
Senior Software Engineer
178
salaries
| ₹42 L/yr - ₹77.7 L/yr |
Software Developer
99
salaries
| ₹33.5 L/yr - ₹57.5 L/yr |
Senior Data Engineer
90
salaries
| ₹23.9 L/yr - ₹61.5 L/yr |
Sde1
83
salaries
| ₹45.6 L/yr - ₹84.2 L/yr |
Salesforce
Amazon
Oracle