Filter interviews by
Given an integer array, find all (a,b,c) such that a^2 + b^2 = c^2. Solution is O(n^2). Write code and testcases.
Use nested loops to iterate through all possible pairs of integers in the array
Check if the sum of squares of the two integers is a perfect square
If yes, add the triplet to the result list
Return the result list
Given a binary tree, check if left and right subtrees are mirror images of each other.
Traverse the tree and compare left and right subtrees recursively.
Use a stack or queue to traverse the tree iteratively.
Check if the left subtree is a mirror image of the right subtree by comparing their values and structures.
Consider an empty tree as a mirror image of itself.
Count the number of occurrences of a given bit pattern in an integer.
Extract the n trailing bits from the pattern and create a mask with all other bits set to zero.
Use a sliding window approach to compare the extracted pattern with all possible n-bit sequences in the input integer.
Increment a counter every time the extracted pattern matches with a sequence in the input integer.
Find the longest repeating substring in a given string.
Create an array of all possible substrings of the given string.
Sort the array in lexicographic order.
Find the longest common prefix between adjacent strings.
Return the longest common prefix found.
If no repeating substring is found, return an empty string.
What people are saying about Microsoft Corporation
WAP to check if binary tree is height-balanced and write testcases
A binary tree is height-balanced if the difference between the heights of its left and right subtrees is not more than 1
Use recursion to check if each subtree is height-balanced
Write testcases to cover all possible scenarios, including empty tree, single node tree, and unbalanced trees
C code to print last n lines of a file given file pointer and integer n.
Use fseek() to move the file pointer to the end of the file
Count the number of newline characters encountered from the end of the file until n lines are found
Use fgets() to read and print the last n lines
Data structure and code for BFS of N-ary tree
N-ary tree can be represented using a node class with a list of child nodes
BFS can be implemented using a queue data structure
Iterate through the queue and add child nodes to the queue
Pop the node from the queue and process it
Repeat until the queue is empty
Code to find inorder successor of given node in binary tree
Check if the given node has a right subtree, if yes then find the leftmost node in the right subtree
If the given node does not have a right subtree, then traverse up the tree until we reach a node which is the left child of its parent
If we reach the root and the given node is the rightmost node, then there is no inorder successor
Merging two sorted linked lists and writing test cases.
Create a new linked list to store the merged list
Compare the first nodes of both lists and add the smaller one to the new list
Repeat until one of the lists is empty, then add the remaining nodes to the new list
Write test cases to cover all possible scenarios, including empty lists and lists of different lengths
Program to check if a given number is a lucky number or not.
Create a function that takes an integer n as input
Initialize a variable count to 2
Loop through the sequence and delete every count-th element
Repeat the above step until the end of the sequence
If n is present in the final sequence, return true, else return false
LeetCode , hard questions on dynamic programming, graphs, and more.
DSA, Cn, os, DBMS, ML
I applied via LinkedIn and was interviewed in Jul 2024. There were 3 interview rounds.
It was bsed on DP, Trees and Graphs
Optimizing code for reduced time complexity by using efficient algorithms and data structures.
Use efficient data structures like hash tables, binary search trees, or priority queues.
Avoid nested loops and try to reduce the number of iterations.
Utilize dynamic programming or memoization to store and reuse intermediate results.
Consider using bitwise operations for certain calculations.
Optimize recursive functions by elim...
I appeared for an interview in Feb 2025, where I was asked the following questions.
DSA, Graph, DP, Arrays
I applied via Referral and was interviewed in Apr 2024. There were 4 interview rounds.
OA Test with 2 medium level questions
Find the kth largest element in an array of integers using efficient algorithms.
Use a max-heap to extract the largest elements efficiently. Example: For array [3, 2, 1, 5, 6, 4] and k=2, return 5.
Alternatively, use quickselect algorithm for average O(n) time complexity. Example: In the same array, quickselect can find the 2nd largest.
Sorting the array and accessing the kth largest directly is simple but O(n log n). Exa...
Count distinct islands in a grid of '1's (land) and '0's (water) using DFS or BFS.
Use Depth-First Search (DFS) or Breadth-First Search (BFS) to explore the grid.
Mark visited land cells to avoid counting them multiple times.
Each time you start a new DFS/BFS from an unvisited land cell, increment the island count.
Example: For grid [['1', '1', '0'], ['0', '1', '0'], ['0', '0', '1']], there are 2 islands.
I applied via Referral and was interviewed in Apr 2024. There were 2 interview rounds.
2 problem related to graphs and dynamic programming 45min I was given to solve I was able to solve both of them and got shortlisted for the next round.
I have a strong technical background, excellent problem-solving skills, and a passion for software development.
I have a Bachelor's degree in Computer Science and 5 years of experience in software development.
I have successfully completed multiple projects using various programming languages such as Java, Python, and JavaScript.
I am a quick learner and always eager to expand my knowledge and skills in the field of softw...
I applied via Campus Placement and was interviewed in Aug 2024. There was 1 interview round.
I am a passionate software developer with experience in Java, Python, and web development.
Experienced in Java, Python, and web development technologies
Strong problem-solving skills
Team player with excellent communication skills
1 hr wide varitey of question
A graph is a data structure that consists of nodes (vertices) connected by edges.
Nodes represent entities and edges represent relationships between entities
Graphs can be directed or undirected
Common graph algorithms include depth-first search and breadth-first search
2 easy level machine coding round.
A logger captures and stores application events for debugging and monitoring purposes.
Log Levels: Define levels like DEBUG, INFO, WARN, ERROR, and FATAL for categorizing logs.
Output Formats: Support multiple formats (e.g., JSON, plain text) for flexibility.
Log Rotation: Implement log rotation to manage file sizes and prevent disk overflow.
Asynchronous Logging: Use asynchronous methods to avoid blocking application perf...
Some of the top questions asked at the Microsoft Corporation Software Developer interview -
The duration of Microsoft Corporation Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 30 interview experiences
Difficulty level
Duration
based on 92 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