Microsoft Online Assessment Questions
Microsoft OA Questions
Name | Time | Online Judge | Experience Level | Platform | Difficulty |
---|---|---|---|---|---|
Even Out Piles  ⭐⭐⭐ | N/A | N/A | N/A | Medium | |
Largest Letter Both Cases  ⭐⭐⭐ | N/A | N/A | N/A | Easy | |
Max Network Rank  ⭐⭐⭐ | N/A | N/A | N/A | Hard | |
Constructing a Photo Frame  ⭐⭐⭐ | N/A | N/A | N/A | Hard |
Even Out Piles
Largest Letter Both Cases
Max Network Rank
Given a map of n cities, and m roads between them, returns the maximal network rank.
The network rank of a city is the total number of roads that are connected to the city.
Write a function, given two arrays starts, ends consisting of m integers each and an integer n, where starts[i] and ends[i] are cities at the two ends of the i-th road.
Example:
Input:
starts = [1, 2, 3, 3]
ends = [2, 3, 1, 4]
n = 4
Output:
4
Explanation:
The chosen cities may be 2 and 3, and the four roads connected to them are: (2,1), (2,3), (3,1), (3,4).
Constructing a Photo Frame
A local artist has two metal rods of lengths A and B. They want to create a perfect square photo frame by cutting these rods into four equal pieces. The artist can only cut the rods into integer lengths and wants to make the largest possible square frame. Any leftover metal is fine - they can use it for other projects.
Write a function that determines the maximum size of the square photo frame that can be created. The function takes two parameters A and B (the lengths of the metal rods) and returns the length of one side of the largest possible square frame. If it's impossible to create a square frame, return 0.
Examples:
-
With rods of length A = 2 and B = 1:
- Result: 0
- Explanation: It's impossible to create a square frame from these rods
-
With rods of length A = 1 and B = 8:
- Result: 2
- Explanation: Cut the 8-unit rod into four 2-unit pieces for the frame
Get one-to-one training from Google Facebook engineers
Top-notch Professionals
Learn from Facebook and Google senior engineers interviewed 100+ candidates.
Most recent interview questions and system design topics gathered from aonecode alumnus.
One-to-one online classes. Get feedbacks from real interviewers.
Customized Private Class
Already a coding expert? - Advance straight to hard interview topics of your interest.
New to the ground? - Develop basic coding skills with your own designated mentor.
Days before interview? - Focus on most important problems in target company question bank.