Microsoft Corporation
10+ Techno Machines Interview Questions and Answers
Q1. Rearrange String Problem Statement
Given a string ‘S’, your task is to rearrange its characters so that no two adjacent characters are the same. If it's possible, return any such arrangement, otherwise return “...read more
Q2. Clone Linked List with Random Pointer
Your task is to create a deep copy of a linked list, where each node has two pointers: one that points to the next node in the list, and a 'random' pointer which can point ...read more
Q3. Find Nodes at Distance K in a Binary Tree
Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is defined as the number of edges between nodes...read more
Q4. My Calendar Problem Statement
Given N
events, each represented with a start
and end
time as intervals, i.e., booking on the half-open interval [start, end). Initially, the calendar is empty. A new event can be ...read more
Q5. Possible Words from a Phone Number: Problem Statement
Given a string S
composed of digits ranging from 2 to 9, determine all possible strings that can be created by mapping these digits to their corresponding l...read more
Q6. Smallest Window Problem Statement
Given two strings S
and X
containing random characters, the task is to find the smallest substring in S
which contains all the characters present in X
.
Input:
The first line co...read more
Q7. Connect Nodes at Same Level Problem Statement
Given a binary tree, connect all adjacent nodes at the same level by populating each node's 'next' pointer to point to its next right node. If there is no next righ...read more
Q8. Snake and Ladder Problem Statement
Given a Snake and Ladder Board with 'N' rows and 'N' columns filled with numbers from 1 to N*N starting from the bottom left of the board, and alternating direction each row, ...read more
Q9. Next Greater Element Problem Statement
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the first elem...read more
Q10. Closest Palindrome Problem Statement
You are given a string 'S' that represents a number. Your task is to find the closest palindromic number to this integer represented by 'S'. The closest number is defined as...read more
Q11. Minimum Operation Needed to Convert to the Given String
You are given two strings str1
and str2
. Determine the minimum number of operations required to transform str1
into str2
.
Explanation:
An operation is def...read more
Q13. Find if a given string exists in a given matrix of characters
Find if a given string exists in a given matrix of characters
Iterate through each character in the matrix and check if it matches the first character of the given string. If it does, perform a depth-first search to check if the rest of the string can be formed from adjacent characters in the matrix.
Use a trie data structure to store all possible substrings of the matrix and check if the given string is present in the trie.
Convert the matrix into a string and use string search...read more
Q15. Get excel column address based on number given.
Get Excel column address based on number given.
Divide the number by 26 and get the remainder and quotient.
Convert the remainder to a character and add it to the result string.
Repeat until quotient is zero.
Q16. Video feed api design
Designing a video feed API
Define endpoints for accessing video feeds
Include authentication and authorization mechanisms
Consider scalability and performance
Support different video formats and resolutions
Provide error handling and logging
Ensure data privacy and security
More about working at Microsoft Corporation
Top SDE-2 Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month