Contribute OA questions
OAHelper
CompaniesProblemsTopicsInterview Experiences
Explore
M

Microsoft

sde

Interview Date

23-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Interview Date

23-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Topics asked

dsa

Detailed experience

PART 1: ALGORITHMIC PROBLEM - SUFFIX ARRAYS & LCP (LONGEST COMMON PREFIX) BASE PROBLEM You are analyzing a massive genomic sequence represented as a string `S` of length `N`. Task: Design an algorithm to find the Longest Repeated Substring in `S` (the substring can overlap with itself). A naive brute-force approach checking all pairs takes O(N^3) time. How can you insert all suffixes of the string into a Trie (Prefix Tree) to find the longest repeated substring, and what is the time and space complexity of this approach? FOLLOW-UP 1 The genomic string is now 10^5 characters long. A standard Suffix Trie requires O(N^2) nodes, which will immediately result in an Out of Memory (OOM) error. Instead of a tree, how do you construct a Suffix Array (an array of sorted suffix indices) and its corresponding LCP (Longest Common Prefix) array in strictly O(N log N) time, and how do you use the LCP array to find the longest repeated substring in O(N) time? FOLLOW-UP 2 The data science team now needs to know the exact mathematical count of *distinct* substrings within the genomic sequence to measure its genetic complexity. Using a HashSet to store all substrings takes O(N^3) time and massive memory. Given that you have already built the Suffix Array and the LCP array in O(N log N) time, how do you leverage the mathematical relationship between the length of the suffixes and the values in the LCP array to calculate the exact number of distinct substrings in strictly O(N) time? ------------------------------------------------ PART 2: SYSTEM DESIGN - HIGH-CONCURRENCY SEAT BOOKING (TICKETMASTER) BASE PROBLEM You are designing the backend for a global ticketing platform (like Ticketmaster or BookMyShow). Users can browse event venues, view available seats in real-time, and purchase specific seats. Design the high-level architecture, focusing on the database schema for venues, events, and individual seats, and the API flow for the booking process. FOLLOW-UP 1 A massive pop-star announces a global tour. At exactly 10:00 AM, 500,000 users attempt to book the exact same front-row seat. If all requests hit your primary PostgreSQL database simultaneously using `SELECT ... FOR UPDATE`, lock contention will exhaust the connection pool and cascade into a complete system outage. How do you design a distributed locking mechanism (e.g., using Redis Lua scripts) to definitively assign the seat to exactly one user in memory before the request ever reaches the persistent database? FOLLOW-UP 2 When the winning user secures the lock, the seat transitions into a "Held" state for 10 minutes, giving them time to enter their credit card details. If they abandon the checkout or their card is declined, the seat must immediately revert to "Available" for other fans. How do you design a highly scalable, distributed delay-queue mechanism (using Redis Keyspace Notifications, RabbitMQ Dead Letter Exchanges, or Kafka) to reliably expire millions of concurrent holds without running constant, expensive cron sweeps over your database? ------------------------------------------------ PART 3: AI / LLM DISCUSSION QUESTIONS In the context of LLM inference, what is the "Prefill Phase" versus the "Decode Phase", and why is the Prefill Phase typically compute-bound (bottlenecked by TFLOPS) while the Decode Phase is strictly memory-bandwidth bound? How does Grouped-Query Attention (GQA) strike an architectural compromise between Multi-Head Attention (MHA) and Multi-Query Attention (MQA), specifically regarding the KV Cache memory footprint during long-context generation? When fine-tuning a foundational model, what is catastrophic forgetting, and how do replay buffers or parameter-efficient fine-tuning (PEFT) methods prevent the model from destroying its generalized pre-trained knowledge? Explain the mechanical difference between Byte-Level BPE (Byte Pair Encoding) and Character-Level tokenization. Why does Byte-Level BPE allow models like GPT-4 to natively process any unicode character (like emojis or obscure languages) without ever encountering an Out-Of-Vocabulary (OOV) token?

Posted on - 24 Sept 2026
Company OAsAll ProblemsTopicsCompany InsightsOA CalendarInterview ExperiencesPremium
OAHelper

Built by students, for students - practice company-specific OAs, DSA sheets, and real interview experiences to land your dream role.

© 2026 OAHelper.in·Terms·Privacy·Refunds·Trust & Safety·Contact·
Ready to crack your next OA?

Practice company-specific questions trusted by thousands of students across India.

Start PracticingGo Premium
OA Practice·DSA·Placements

Disclaimer: OAHelper is an independent educational platform. We (oahelper.in) do not own the images or questions shown. Content is uploaded by users.