Microsoft SDE Intern Interview Experience
💼 LTIMindtree Interview Experience (On-Campus) | Fresher | 2026
Salesforce SMTS | Interview Experience | Rejected
JPMC | SDE2 (Associate) - Java Backend - Interview Experience + Compensation
Microsoft - SDE2 - Coding Round
Datadog Initial Coding Screen - Mid/Senior position - USA
Summary
I had an initial coding screen for a Mid/Senior position at Datadog in USA, where I was asked to implement a solution similar to rm -rf. I solved it using a recursive DFS approach and then optimized it to an iterative BFS approach to handle OOM issues for wide file structures, successfully moving to the next round.
Full Experience
I got the same question as this one:
https://leetcode.com/discuss/post/4159607/datadog-onsite-rm-rf-by-anonymous_user-e3bf/
- I was asked to implement a solution. I implemented a recursive DFS solution.
- The follow up was to update the code to avoid OOM issue.
- I suggested that we can use an iterative approach instead of recursion.
- We had an in depth discussion on why a recursive solution can cause OOM issue.
- The Interviewer followed up with sharing that file structure is not deep but rather wide. Say max directory depth is only 10 but the number of files in the directory are in millions.
- I suggested a BFS based approach. The Interviewer was happy with the approach and implementation.
- I am moving on to the next round !!
Interview Questions (1)
The problem involved implementing a file system deletion mechanism similar to rm -rf. I initially implemented a recursive DFS solution. The follow-up challenged me to update the code to avoid Out Of Memory (OOM) issues, especially considering a file structure that is wide (millions of files in a directory) rather than deep (max directory depth of 10). This led to a discussion about recursive versus iterative approaches and eventually suggesting a BFS-based approach for efficiency.