Filter interviews by
2 DSA questions asked on codility platform. One was about backtracking, and another about 1D DP.
Check if any node in binary tree violates left node value less than right node value rule.
Traverse the binary tree using depth-first search (DFS) or breadth-first search (BFS) and check each node for the given condition.
If a node has two children and the left child's value is greater than the right child's value, return false.
If no such node is found, return true.
Example: For a binary tree with nodes 5, 3, 7, 2, 4, 6, ...
Use a hash set to efficiently remove duplicate characters from a string.
Create a hash set to store unique characters.
Iterate through the string and add each character to the hash set.
If a character is already in the hash set, skip it.
Convert the hash set back to a string to get the result.
I applied via Company Website and was interviewed in Aug 2023. There were 3 interview rounds.
Asked from sorting and DP.two qeustions were there
Convert Roman numerals to numbers
Create a mapping of Roman numerals to their corresponding values
Iterate through the Roman numeral string from right to left
If the current numeral is smaller than the next numeral, subtract its value from the total
Otherwise, add its value to the total
Rotate the array in place by k steps
Use the modulus operator to handle cases where k is greater than the array length
Reverse the entire array, then reverse the first k elements and the remaining elements separately
I applied via Company Website and was interviewed before Oct 2019. There were 4 interview rounds.
I applied via Campus Placement and was interviewed before Nov 2021. There were 3 interview rounds.
Numerical and logical aptitude test
There are 5 rounds on datastructure and algorithm
What people are saying about Microsoft Corporation
Design a traffic signal system
Identify the number of lanes and intersections
Determine the traffic flow and peak hours
Choose appropriate sensors and controllers
Implement a synchronization algorithm
Consider emergency vehicle prioritization
Include pedestrian crossing signals
Ensure compliance with local regulations
Hashmap is a data structure that stores key-value pairs and provides constant time complexity for insertion, deletion, and retrieval.
Hashmap uses hashing function to map keys to indices in an array
Collisions can occur when multiple keys map to the same index, which can be resolved using separate chaining or open addressing
Java implementation: HashMap<String, Integer> map = new HashMap<>();
Printing patterns using code
Identify the pattern to be printed
Use loops to print the pattern
Adjust the loop variables to control the pattern
Use conditional statements to modify the pattern
Examples: printing stars, triangles, squares, etc.
Common point in linked list refers to the node where two or more linked lists intersect.
The common point can be found by traversing both linked lists and comparing the nodes.
The common point can also be found by using two pointers, one for each linked list, and moving them until they meet at the common point.
Examples include finding the intersection point of two linked lists or finding the loop in a linked list.
I appeared for an interview before Nov 2020.
Round duration - 45 minutes
Round difficulty - Medium
The interview was with a Korean employee.
Given an undirected graph with V vertices and E edges, your task is to find all the bridges in this graph. A bridge is an edge that, when removed, increases the number of...
Find all the bridges in an undirected graph.
Use Tarjan's algorithm to find bridges in the graph.
A bridge is an edge whose removal increases the number of connected components.
Check for bridges by removing each edge and checking the number of connected components.
Return the edges that are bridges in non-decreasing order.
Round duration - 45 Minutes
Round difficulty - Medium
Interviewer was an Indian employee.
You are provided with a string STR
of length N
. The goal is to identify the longest palindromic substring within this string. In cases where multiple palind...
Identify the longest palindromic substring in a given string.
Iterate through the string and expand around each character to find palindromes
Keep track of the longest palindrome found
Return the longest palindrome with the smallest start index
Round duration - 45 Minutes
Round difficulty - Hard
Interviewer was an Indian employee.
You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictiona...
Given a sorted alien dictionary in an array of strings, determine the character order of the alien language.
Iterate through the words in the dictionary to build a graph of character dependencies.
Perform a topological sort on the graph to determine the character order.
Return the character order as a list of characters.
Round duration - 45 Minutes
Round difficulty - Hard
Interviewer was an Indian employee.
The Ninja has a robot which navigates an infinite number line starting at position 0 with an initial speed of +1. The robot follows a set of instructions which includes ‘A’ (Acceler...
Determine the minimum length of instruction sequence for a robot to reach a given target on an infinite number line.
Start at position 0 with speed +1, update position and speed based on 'A' and 'R' instructions
For each test case, find the shortest sequence of instructions to reach the target
Consider both positive and negative positions for the robot
Tip 1 : Do competitive coding in 1st and 2nd year.
Tip 2 : Practice basic questions before starting complex problem.
Tip 3 : Start doing mock interviews from the end of 5th semester. It gives a lot of confidence.
Tip 1 : Adding competitive programming ranks add value.
Tip 2 : You should have some good project which you can explain nicely.
I appeared for an interview before Sep 2020.
Round duration - 120 Minutes
Round difficulty - Easy
The round was conducted in day around 3PM.
Given an array ARR
consisting of 'N' positive integers, determine if it is possible to partition the array into two subsets such that the sum of the elements in both sub...
The problem is to determine if it is possible to partition an array into two subsets with equal sum.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the results of subproblems.
Check if the sum of the array is even before attempting to partition it.
Iterate through the array and update the 2D array based on the sum of subsets.
Return true if a subset with half the sum is found, false ot...
Round duration - 30 Minutes
Round difficulty - Easy
The interview was preponed and was conducted at 9AM.
The interviewer was friendly and I had saw him earlier at pre-placement talk.
Given a string STR
, your task is to remove spaces from STR
and convert it to Pascal case format. The function should return the modified STR
.
In Pascal case, words are con...
Convert a given string to Pascal case format by removing spaces and capitalizing the first letter of each word.
Iterate through each character in the string
If the character is a space, skip it
If the character is not a space and the previous character is a space or it is the first character, capitalize it
SQL query to retrieve the Nth highest salary from a database
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to retrieve the Nth highest salary
Consider handling cases where there might be ties for the Nth highest salary
Round duration - 30 Minutes
Round difficulty - Easy
This round was conducted 15mins after 1st round.
You are given a singly Linked List with 'N' nodes containing integer data and an integer 'K'. Your task is to delete the Kth node from the end of this Lin...
Remove the Kth node from the end of a singly linked list.
Traverse the list to find the length 'N'.
Calculate the position of the node to be removed from the beginning as 'N - K + 1'.
Remove the node at the calculated position.
Handle edge cases like removing the head or tail of the list.
Update the pointers accordingly after removal.
Tip 1 : Do Competitive Coding
Tip 2 : Learn at least 1 framework
Tip 3 : Build interest in computers
Tip 1 : Be well informed of everything you mention in your resume
Tip 2 : Mention competitive coding achivements in your resume(if any)
I applied via LinkedIn and was interviewed in May 2021. There were 4 interview rounds.
I applied via Company Website and was interviewed in Dec 2020. There was 1 interview round.
Time complexity measures the amount of time an algorithm takes to complete based on input size.
Time complexity is expressed using Big O notation (e.g., O(n), O(log n)).
O(1) indicates constant time, e.g., accessing an array element.
O(n) indicates linear time, e.g., iterating through an array.
O(n^2) indicates quadratic time, e.g., nested loops through an array.
O(log n) indicates logarithmic time, e.g., binary search in a...
based on 2 interview experiences
Difficulty level
Duration
based on 5 reviews
Rating in categories
Software Engineer
2.5k
salaries
| ₹24.9 L/yr - ₹44 L/yr |
Senior Software Engineer
1.4k
salaries
| ₹37.5 L/yr - ₹75.7 L/yr |
Software Engineer2
1.2k
salaries
| ₹33 L/yr - ₹60 L/yr |
Software Developer
1.1k
salaries
| ₹23.9 L/yr - ₹40 L/yr |
Support Engineer
608
salaries
| ₹14.4 L/yr - ₹24.7 L/yr |
Amazon
Deloitte
TCS