Microsoft Interview | L62 | Selected
Anonymous User
568

Applied on career website

Got email for screening round after three weeks.

R1 (45 mins screening round with HM): 1 DSA problem - Expression evaluator similar to (https://leetcode.com/problems/evaluate-reverse-polish-notation/description/).

R2 (60 mins) : this was supposed to be coding round but interviewer asked my current project architecture and some HLD followups on same.

R3 (60 mins) : this was the coding round, given the list of DB backups for a DB, need to retain the 7 most recent backups and provide the list of backups to be deleted.
Expectation was production ready code, edge case handling, fault tolerance and high level aspects of the implementation. Need to keep it extensible as well.

A backup class was given with created timestamp.
class Backup{
backup_id,
metadata,
createdTime
}

need to implement the function
List<\Backup> getToBeDeletedBackups(List<\Backup>){}

I used minheap to keep the 7 most recent backup by comapring thier timestamps and returned the remaining backup in the list as the output to delete those backups.

I implemented a separate class having this method and also made the number of most recent backup as configurable. Along with this, i discussed about the possible edge cases and added handling.

Followups -
Keep 1 most recent backup for each day in a week
Keep 1 most recent backup for each week in a month
Keep 1 most recent backup for each month for last 4 months

for the first followups, i explained that i will segregate the data date wise and create buckets for each day keeping track of recent backups for each. Used a hashmap for this.
Similarly for other followups, we can create weekly and monthly buckets.

R4 (60 mins) AA round: Was asked a backtracking question, two players rolling a 3 face dice, each time one player rolls the dice gets the score (1-3). whomever reaches the target score wins. Count all the valid game sequences.

Offer details - https://leetcode.com/discuss/post/8507131/microsoft-offer-l62-azure-mysql-by-iamsa-o8ft/

Comments (3)