morphle_labs_prep_guide.md

šŸŽÆ Morphle Labs — Full Stack Engineering Intern: Complete Preparation Guide

Candidate: Omkumar Mangukiya | IIIT Vadodara | B.Tech CSE
Role: Full Stack Engineering Intern
Location: Bangalore HQ (Office-based)
Stack Required: React.js (Frontend) + Django/Python (Backend) + REST APIs
Interview Date: TBD — Prep started September 12, 2026


šŸ“‹ Table of Contents

  1. Company Intel & What They Actually Value
  2. Interview Structure — All 6 Rounds Decoded
  3. Round 1 — Resume Shortlisting: How to Stand Out
  4. Round 2 — Aptitude/Logical Puzzles (20 mins, 3 problems)
  5. Round 3 — Technical + Projects Deep Dive
  6. Round 4 — CEO Round (Conversational/Culture Fit)
  7. Round 5 — CTO Round (Live Debugging/Systems Thinking)
  8. Round 6 — React Hands-On Task
  9. Django/Python Crash Course (Your Gap Area)
  10. React.js — Deep Concepts & Interview Patterns
  11. DSA — Targeted Topics for Morphle
  12. Operating Systems & Concurrency — CTO Round Prep
  13. REST API Design & Backend Concepts
  14. Project Pitch Scripts — How to Present Your Work
  15. Your Strengths & Gap Analysis

1. Company Intel & What They Actually Value

What is Morphle Labs?

  • YC W20 medtech/deep-tech startup, Bangalore HQ, ~140 employees
  • Builds robotic/AI-powered digital pathology hardware + software
  • Products: Robotome (automated microscopy), MorphoLens (AI slide analysis), HemoLens (blood analysis), RoboReq (lab automation)
  • Series A ($5M led by Inflexor Ventures), ~$9M+ ARR
  • Market leader in India, expanding to US/Europe/SEA

Their Hiring Philosophy (Straight from Co-founder Anirudh Bajaj)

"Get hired, without DSA or system design interviews. The best engineers are rarely the ones who memorized the most interview patterns. They're the ones who can understand messy systems, reason through ambiguity, break down problems, and find practical solutions. Real hiring should test analytical thinking, not interview preparation skills." — Anirudh Bajaj, Co-founder, May 2026

What This Means for You

What They WantWhat They DON'T Want
Analytical thinking & first-principles reasoningMemorized LeetCode patterns
Ability to debug messy, real-world systemsTextbook system design recitations
Clear verbal reasoning even without a full solutionSilent coding
Genuine curiosity & problem decompositionTemplate answers
Understanding trade-offs in YOUR projectsListing technologies without depth

2. Interview Structure — All 6 Rounds Decoded

Source: Souvik Maity's detailed interview experience (October 2025 on-campus drive) + AmbitionBox candidate reports

flowchart TD A["Round 1: Resume Shortlisting"] --> B["Round 2: Aptitude / Logical Puzzles\n(3 puzzles, 20 min strict)"] B --> C["Round 3: Technical + Projects\n(DSA + React/Node + Project deep-dive)"] C -->|"Only ~4 students advance"| D["Round 4: CEO Round\n(Conversational — interests, motivation, goals)"] D -->|"Only ~2 students advance"| E["Round 5: CTO Round\n(Live debugging — concurrency/OS problem)"] E --> F["Round 6: React Hands-On Task\n(Build/fix a React component live)"] F --> G{"Final Decision"} style A fill:#1a1a2e,stroke:#e94560,color:#fff style B fill:#1a1a2e,stroke:#e94560,color:#fff style C fill:#16213e,stroke:#0f3460,color:#fff style D fill:#16213e,stroke:#0f3460,color:#fff style E fill:#0f3460,stroke:#e94560,color:#fff style F fill:#0f3460,stroke:#e94560,color:#fff style G fill:#e94560,stroke:#fff,color:#fff

[!IMPORTANT] The funnel is AGGRESSIVE. From a typical campus batch, only ~4 make it past Round 3, and only ~2 past Round 4. You need to be convincing at every stage.


3. Round 1 — Resume Shortlisting

Your Advantages

  • āœ… VTBIT internship — real production full-stack experience (JWT auth, Redis caching, node-cron automation)
  • āœ… Patient Management System — DIRECTLY relevant to Morphle's healthcare domain
  • āœ… Distributed Webhook Engine — shows systems thinking (BullMQ, circuit breakers, fault tolerance)
  • āœ… LeetCode Knight (1899 peak, 500+ problems) — strong signal
  • āœ… Docker, Redis, PostgreSQL — production-grade tools

Potential Red Flag

  • āš ļø No Django/Python on resume — the JD explicitly asks for it. They may still shortlist you based on overall strength, but be ready to address this gap proactively.

4. Round 2 — Aptitude/Logical Puzzles

Format

  • 3 logical puzzles in 20 minutes (strict time limit)
  • NOT coding problems — these are analytical/mathematical reasoning puzzles
  • This is a standard first filter across ALL roles at Morphle

Confirmed Question Types from AmbitionBox & Candidate Reports

TypeExample from Morphle
Rate/Traffic problems"If one auto crosses Howrah Bridge in x minutes, how many autos can cross it in one hour?"
3D geometry/counting"If a cube is cut x times, how many pieces will it be divided into?"
Estimation/Fermi problems"What is the time taken to cross Howrah Bridge in Kolkata?"

30 Must-Practice Puzzle Categories

Category 1: Rate & Traffic Puzzles

  1. Bridge/Torch crossing — 4 people, 1 torch, varying speeds, cross in minimum time
  2. Pipe and cistern — two pipes filling/draining, when does it fill?
  3. Trains crossing — two trains approaching, when/where do they meet?
  4. Auto/vehicle throughput — given individual crossing time, how many in an hour? (Morphle asked this!)
  5. Relay problems — people passing objects with different speeds

Category 2: Counting & Geometry

  1. Cube cutting — N cuts → how many pieces? (Morphle asked this!)
    • Formula: max pieces with n cuts through a cube = depends on axis cuts
    • For cuts along 3 axes (a, b, c cuts): (a+1)(b+1)(c+1) pieces
  2. Handshake problem — N people, how many handshakes?
  3. Paint the cube — painted cube cut into smaller cubes, how many have 0/1/2/3 faces painted?
  4. Chessboard problems — how many squares/rectangles on an 8Ɨ8 board?
  5. Coin arrangements — place N coins so each row/column has a certain count

Category 3: Logic & Deduction

  1. Truth-teller / Liar — one question to find which door is safe
  2. Poisoned wine bottles — N bottles, 1 poisoned, how many prisoners needed?
  3. 3 switches and 3 bulbs — you can enter the room only once
  4. Weighing puzzle — 8 balls (or 12 balls), 1 heavier, minimum weighings
  5. Monty Hall problem — should you switch doors?

Category 4: Mathematical/Number Puzzles

  1. Missing number in sequence — find the pattern
  2. Clock angle problems — what angle between hour and minute hand at X:YZ?
  3. Calendar puzzles — what day was Jan 1, 1900?
  4. Divisibility tricks — is this large number divisible by 7?
  5. Digit sum puzzles — how many numbers between 1-1000 have digit sum = 15?

Category 5: Probability & Expected Value

  1. Two dice probability — P(sum = 7)?
  2. Birthday paradox — minimum people for >50% chance of shared birthday
  3. Coin flip expectations — expected flips to get 2 consecutive heads
  4. Balls in bags — optimize placement for max probability of drawing red
  5. Broken stick problem — break a stick at 2 random points, probability of forming triangle

Category 6: Strategy & Optimization

  1. Egg drop problem — 2 eggs, 100 floors, minimum trials
  2. Water jug problem — 3L and 5L jugs, measure exactly 4L
  3. River crossing — farmer, wolf, goat, cabbage
  4. Gold bar payment — pay worker for 7 days with single cut of gold bar
  5. Tournament problem — minimum matches to find the winner/runner-up

Category 7: Simulation, Cellular Automata & Ecosystem Equilibrium

  1. Predator-Prey Grid Placement (Wolf, Sheep, Grass) — place species in a grid to avoid extinction
  2. Conway's Game of Life Stable / Oscillator Configurations — find initial states that survive indefinitely
  3. Wa-Tor Ocean Simulation — balance fish reproduction and shark starvation cycles
  4. Ant Foraging / Pheromone Lattice — optimal food depot and nest placement for continuous throughput
  5. Resource Depletion vs. Regeneration Rates — critical thresholds for sustainable harvesting

[!TIP] Time strategy: 20 minutes for 3 problems = ~6.5 minutes each. Start with the one you're most confident about. Write down your reasoning — don't just compute mentally. If stuck after 3 minutes, write what you know and move on.


4A. Deep Dive: Predator-Prey Grid Simulation Puzzle (The 9Ɨ9 Ecosystem)

Interview Problem: "You are given a 9Ɨ9 grid, 1 Wolf, 5 Sheep, and 12 Grass tiles. Place them on the grid such that none of the species go extinct over time."

+---+---+---+---+---+---+---+---+---+ | W | | | | | | | | | <- Wolf placed at top-left corner +---+---+---+---+---+---+---+---+---+ | | | | | | | | | | (Buffer distance = ~6-8 steps) +---+---+---+---+---+---+---+---+---+ | | | | | | | | | | +---+---+---+---+---+---+---+---+---+ | | | | G | G | | | | | <- Patch A (4 Grass + 2 Sheep) | | | | S | G | G | S | | | +---+---+---+---+---+---+---+---+---+ | | | | | | | | | | +---+---+---+---+---+---+---+---+---+ | | | | | | G | G | | | <- Patch B (4 Grass + 2 Sheep) | | | | | | S | G | G | S | +---+---+---+---+---+---+---+---+---+ | | | | | | | | | | +---+---+---+---+---+---+---+---+---+ | | | | | | | G | G | G | <- Patch C (4 Grass + 1 Sheep) | | | | | | | G | S | | (Far-side reserve / nursery) +---+---+---+---+---+---+---+---+---+

1. Why Startups (Like Morphle) Ask This

This puzzle evaluates dynamic systems thinking, feedback loops, and first-principles decomposition:

  • It is based on Lotka-Volterra equations and cellular automata (like NetLogo's Wolf-Sheep Predation).
  • Rather than checking standard textbook formulas, it tests whether you can identify failure modes (boom-and-bust cycles, overgrazing, starvation) and engineer a resilient equilibrium.

2. The Core Mechanics & Rules

  1. Grass (Producers): Static or slowly spreading. Grazed by sheep for energy. Regrows after a cooldown ($k$ turns).
  2. Sheep (Herbivores): Move towards grass. Gain energy by eating. Reproduce when energy crosses threshold $E_{rep_sheep}$. Starve if energy drops to 0.
  3. Wolves (Carnivores/Predators): Move towards sheep. Gain energy by eating sheep. Reproduce when energy crosses threshold $E_{rep_wolf}$. Starve if they go $M$ turns without a catch.

3. The 3 Deadly Failure Modes (Why Naive Placements Fail)

Failure ModeCauseResult
Immediate Predation (Boom & Bust)Wolf placed adjacent/close to sheepWolf eats 2-3 sheep in first 3 turns $\rightarrow$ Sheep population falls below reproduction threshold $\rightarrow$ Sheep extinct $\rightarrow$ Wolf starves.
Overgrazing CollapseAll sheep clustered on a single grass patchSheep consume all 12 grass before regrowth $\rightarrow$ Sheep starve en masse $\rightarrow$ Ecosystem collapses.
Predator Starvation (Isolation Trap)Wolf placed too far behind impenetrable barriers / cornersWolf cannot reach any sheep before its starvation turn count runs out $\rightarrow$ Wolf extinct.

4. The 4-Step Strategic Placement Framework

Step 1: Spatial Buffer (Distance Delay)
  • Place the Wolf at one corner (e.g., coordinate (0, 0)).
  • Place the first Sheep at Manhattan distance $D \approx 5\text{ to }7$ tiles away.
  • Why: The wolf needs several turns to track the first prey. During this delay, the sheep have enough turns to eat grass, accumulate energy, and trigger their first reproduction cycle before the first predator strike.
Step 2: Fragment the Grass into 2–3 Micro-Habitats (Refuges)
  • Divide the 12 Grass into 3 clusters of 4 (or 2 clusters of 6) separated by empty buffer zones.
  • Why: If one patch is completely grazed, the other patches continue regrowing. It prevents synchronized exhaustion of the entire food supply.
Step 3: Decentralize the Sheep Population
  • Distribute the 5 sheep across the separate grass patches:
    • Patch 1 (Intermediate zone): 2 Sheep (Bait & initial reproduction buffer)
    • Patch 2 (Mid-distance): 2 Sheep (Sustained reproduction)
    • Patch 3 (Far corner (8, 8)): 1 Sheep (Nursery/Reserve refuge)
  • Why: When the wolf targets Patch 1, the sheep in Patch 2 and Patch 3 are undisturbed and continue breeding. By the time the wolf finishes in Patch 1 and moves to Patch 2, Patch 1's grass is regrowing and Patch 3 has multiplied.
Step 4: Utilize Grid Geometry & Boundary Dynamics
  • Keep grass patches slightly offset from grid edges so sheep have multi-directional escape paths if pursued, preventing sheep from getting cornered instantly.

5. How to Articulate Your Thought Process Live to the Interviewer

When explaining your setup, structure your answer around system equilibrium:

  1. "The primary risk in predator-prey systems is the boom-and-bust cycle, where initial predation outpaces the prey reproduction rate."
  2. "I'm introducing an initial spatial phase delay by placing the predator at Manhattan distance $D$ from the nearest prey, allowing turn-0 grazing and early reproduction."
  3. "I'm splitting the food source and prey into decentralized patches so predation is localized, creating safe havens that prevent global extinction."

Resources to Practice

  • "50 Challenging Problems in Probability" by Frederick Mosteller
  • GeeksforGeeks Puzzle section: geeksforgeeks.org/puzzles
  • BrainStellar: brainstellar.com — curated puzzle collection, sorted by difficulty
  • InterviewBit Puzzles section
  • NetLogo Wolf-Sheep-Grass Predation Model — for visualizing ecosystem equilibrium parameters

5. Round 3 — Technical + Projects Deep Dive

This round has THREE components:

5A. Project Discussion (Deep Dive)

They will ask you to walk through a project end-to-end — architecture, trade-offs, why you made specific decisions.

Topics They'll Probe

Question PatternWhat They're Testing
"Why did you use X instead of Y?"Trade-off reasoning
"What happens if this service goes down?"Fault tolerance thinking
"How would you scale this to 10x traffic?"Scalability awareness
"Walk me through a request from client to response"Full-stack understanding
"What was the hardest bug you fixed?"Debugging ability
"If you had to rebuild this, what would you change?"Self-awareness & growth

Your Projects — Preparation Scripts

Lead with: Patient Management System (healthcare = Morphle domain match!)

Prepare to articulate:

  • Why role-based access (doctor vs patient) and how middleware enforces isolation
  • How the appointment booking engine handles concurrent requests (conflict resolution)
  • The missed-dose detection system — how it monitors schedules
  • Database schema design (Prisma + PostgreSQL) — relationships, indexes
  • What you'd change: "I'd add WebSocket notifications for real-time updates" or "I'd implement audit logging for compliance"

Strong backup: Distributed Webhook Delivery Engine

Prepare to articulate:

  • Why you decoupled ingestion from delivery (BullMQ job queue architecture)
  • Circuit breaker design — why 3 states? What are the thresholds?
  • Exponential backoff — formula, max retries, jitter
  • HMAC-SHA256 signing — why not just HTTPS? (integrity vs transport security)
  • Load test results: 1080 req/sec, 126ms latency — how you benchmarked this
  • PostgreSQL audit log design — why immutable? What indexes?

URL Shortener — good for Redis/caching discussion:

  • Cache-aside vs write-through pattern
  • Token rotation flow
  • Rate limiting implementation

5B. DSA Question (Medium Level)

Based on candidate reports: Recursion & Backtracking was asked. Expect medium-level, not hard.

Must-Know DSA Topics (Prioritized for Morphle)

Tier 1 — MOST LIKELY (Recursion/Backtracking focus):

  1. N-Queens Problem — classic backtracking
  2. Sudoku Solver — constraint propagation + backtracking
  3. Permutations / Combinations generation — with and without duplicates
  4. Subset Sum / Partition Equal Subset Sum
  5. Word Search in Grid — DFS + backtracking
  6. Generate Parentheses — valid combinations
  7. Rat in a Maze — path finding with backtracking
  8. Letter Combinations of Phone Number
  9. Combination Sum I, II, III — variations
  10. Palindrome Partitioning

Tier 2 — LIKELY (General medium DSA): 11. Binary Tree traversals — iterative + recursive, level order 12. Graph BFS/DFS — connected components, cycle detection 13. Linked List operations — reverse, detect cycle, merge sorted 14. Two Pointer / Sliding Window — subarray problems 15. Stack/Queue applications — next greater element, valid parentheses 16. HashMap patterns — two sum, group anagrams, frequency counting 17. Binary Search variations — search in rotated array, find peak 18. Dynamic Programming basics — climbing stairs, coin change, LIS

Tier 3 — LESS LIKELY (but know concepts): 19. Trie — autocomplete, word dictionary 20. Heap/Priority Queue — K largest, merge K sorted lists

[!NOTE] Your LeetCode Knight badge (1899 peak, 500+ problems) means DSA is your strongest area. Don't over-prepare here — focus more time on your gap areas (Django, OS concurrency). But do practice narrating your approach out loud since Morphle values reasoning over just getting the answer.

5C. React & Node.js Fundamentals

React.js Topics to Know Cold

TopicKey Concepts
Component LifecycleMounting, updating, unmounting phases
Hooks (Deep Understanding)useState, useEffect, useContext, useReducer, useMemo, useCallback, useRef
useEffect CleanupWhy cleanup is needed, memory leaks, event listener removal
State ManagementLocal state vs lifted state vs Context vs Redux (when to use what)
Virtual DOMHow reconciliation works, diffing algorithm basics, keys and why they matter
Rendering BehaviorWhen does a component re-render? What triggers unnecessary re-renders?
Controlled vs Uncontrolled ComponentsForm handling patterns
Custom HooksHow to extract reusable logic into custom hooks
Error BoundariesClass component error handling, componentDidCatch
React.memo / PureComponentPreventing unnecessary re-renders
Prop Drilling & SolutionsContext API, composition pattern
Suspense & Lazy LoadingCode splitting with React.lazy() and Suspense

React — Common Interview Questions

  1. "What happens when you call setState?"

    • State update is batched (in React 18, all updates are auto-batched)
    • Triggers re-render, virtual DOM diff, then real DOM update
    • State updates are asynchronous in event handlers
  2. "Explain the useEffect dependency array"

    • [] → runs once after mount (like componentDidMount)
    • [dep] → runs when dep changes
    • No array → runs after every render
    • Return function → cleanup before next effect or unmount
  3. "Why do we need keys in lists?"

    • Helps React's reconciliation algorithm identify which items changed
    • Using index as key is an anti-pattern when list order changes
    • Should use stable, unique identifiers
  4. "What is a closure in React hooks?"

    • Stale closure problem: callback captures old state value
    • Solutions: useRef for mutable reference, functional update setState(prev => prev + 1)
  5. "What's the difference between useMemo and useCallback?"

    • useMemo memoizes a computed value
    • useCallback memoizes a function reference
    • Both take a dependency array

Node.js/Express Topics to Know

TopicDetails
Event LoopCall stack, callback queue, microtask queue, phases
Middleware PatternHow Express middleware chain works, next()
Error HandlingGlobal error handler, async error wrapping
AuthenticationJWT flow, access/refresh tokens, middleware guards
Database QueriesN+1 problem, Prisma relations, raw queries
Async Patternsasync/await, Promise.all, Promise.allSettled

6. Round 4 — CEO Round

Format

  • Conversational, NOT technical
  • Focused on: interests, motivation, long-term goals, culture fit
  • "Engaging" according to candidate reports

Topics to Prepare

About You

  • "Tell me about yourself" — 60-second pitch: IIIT Vadodara CSE → full-stack passion → healthcare project relevance → Morphle excitement
  • "Why Morphle Labs specifically?" — Connect healthcare tech + your Patient Management System + genuine interest in their mission (making pathology accessible)
  • "Where do you see yourself in 5 years?" — Show growth mindset, not just "I want to be a manager"

About Morphle (RESEARCH THESE!)

  • Know their products: Robotome, MorphoLens, HemoLens, RoboReq
  • Know they're solving: pathologists are scarce (1 per 100,000 in India vs 1 per 15,000 in US), AI-assisted diagnosis can save lives
  • Know they're YC W20, the competitive advantage it gives
  • Know recent news: Series A, India market leadership, expansion plans

Genuine Enthusiasm Points You Can Use

  • "My Patient Management System made me realize how important reliable healthcare software is — a bug isn't just a 500 error, it's a missed diagnosis"
  • "I'm drawn to Morphle because you're at the intersection of hardware and software — that's rare for an early-stage company"
  • "The co-founder's post about hiring for analytical thinking over interview prep really resonated with me"

Questions YOU Should Ask

  1. "What does a typical week look like for a full-stack intern?"
  2. "How do interns contribute to the product roadmap?"
  3. "What's the team structure — do interns work with senior engineers?"
  4. "What does the path from intern to PPO look like?"

[!TIP] The CEO round eliminated 50% of candidates (4 → 2). Be authentic, show genuine curiosity about their mission, and demonstrate that you've done your homework on the company.


7. Round 5 — CTO Round (THE HARDEST)

What to Expect

Based on candidate reports, this is a live debugging round focused on:

  • Concurrency-based OS problems
  • Coordination between multiple processes
  • NOT a LeetCode problem — more "here's a buggy/broken system, debug it live"

"I was asked to debug a concurrency-based operating systems problem involving coordination between multiple processes. I could explain the approach and reasoning, but couldn't fully crack it during the interview." — Souvik Maity (the candidate who made it to this round)

Key Insight

The candidate who could explain the approach and reasoning (even without fully solving it) still made it to Round 6. Verbalizing your thought process is critical.

Must-Know Concurrency & OS Topics

A. Process Synchronization Primitives

ConceptWhat to Know
MutexMutual exclusion, ownership (only the thread that locked can unlock)
SemaphoreCounting semaphore vs binary semaphore, wait() and signal()
MonitorHigh-level synchronization, condition variables
SpinlockBusy waiting, when it's appropriate (very short critical sections)
Read-Write LockMultiple readers OR single writer, reader starvation vs writer starvation

B. Classic Concurrency Problems (MUST KNOW!)

  1. Producer-Consumer (Bounded Buffer)

    • Shared buffer with limited size
    • Producer waits when full, consumer waits when empty
    • Solution: 2 semaphores (empty, full) + 1 mutex
  2. Reader-Writer Problem

    • Multiple readers can read simultaneously
    • Writers need exclusive access
    • Know both: reader-priority and writer-priority solutions
  3. Dining Philosophers

    • 5 philosophers, 5 forks
    • Deadlock conditions & solutions (resource ordering, chandy/misra)
  4. Sleeping Barber

    • Barbershop with limited waiting chairs
    • Coordination between barber and customers
  5. Cigarette Smoker Problem

    • Agent provides 2 of 3 ingredients
    • Each smoker has 1 ingredient, needs the other 2

C. Deadlock (CRITICAL)

  • Four conditions: Mutual exclusion, Hold & Wait, No Preemption, Circular Wait
  • Prevention: Break any one condition
  • Detection: Wait-for graph, cycle detection
  • Recovery: Process termination, resource preemption
  • Avoidance: Banker's algorithm

D. Race Conditions & Debugging Patterns

ScenarioSymptomsFix
Lost updateCounter doesn't match expected valueAtomic operations or mutex
Dirty readReading partially written dataProper locking granularity
TOCTOU bugCheck-then-act raceAtomic compare-and-swap
StarvationOne thread never gets CPU timeFair scheduling / priority inversion handling
LivelockThreads actively running but making no progressRandomized backoff
Priority inversionHigh-priority thread blocked by low-priorityPriority inheritance protocol

E. Inter-Process Communication (IPC)

  • Pipes (named and unnamed)
  • Message Queues
  • Shared Memory + synchronization
  • Sockets (for network IPC)
  • Signals

F. Practice: Debug This Concurrency Bug

Example 1: The broken counter

# Two threads incrementing a shared counter counter = 0 def increment(): global counter for _ in range(1000000): counter += 1 # BUG: not atomic! Read-modify-write race # After both threads: counter << 2000000 # Fix: use threading.Lock or atomic operations

Example 2: Deadlock scenario

import threading lock_a = threading.Lock() lock_b = threading.Lock() def thread_1(): lock_a.acquire() # ... some work ... lock_b.acquire() # DEADLOCK: thread_2 holds lock_b, waiting for lock_a lock_b.release() lock_a.release() def thread_2(): lock_b.acquire() # ... some work ... lock_a.acquire() # DEADLOCK: thread_1 holds lock_a, waiting for lock_b lock_a.release() lock_b.release() # Fix: Always acquire locks in the same order (lock_a before lock_b)

Example 3: Producer-Consumer with a bug

import threading buffer = [] MAX_SIZE = 10 def producer(): while True: if len(buffer) < MAX_SIZE: # BUG: TOCTOU race condition item = produce_item() buffer.append(item) # Another thread might have filled it! def consumer(): while True: if len(buffer) > 0: # BUG: TOCTOU race condition item = buffer.pop(0) # Another thread might have emptied it! consume_item(item) # Fix: Use threading.Condition with wait/notify

[!WARNING] Strategy for this round: Even if you can't fully solve it, KEEP TALKING. Narrate your reasoning: "I think the issue is a race condition because..." / "Let me trace through what happens if Thread A gets preempted here..." The candidate who got credit explicitly mentioned that explaining the approach mattered even without fully cracking it.


8. Round 6 — React Hands-On Task

What to Expect

  • A practical build or fix exercise in React
  • Likely timed (30-60 minutes)
  • Could be: build a component from scratch, fix broken React code, or implement a feature

Common React Hands-On Task Patterns

Pattern 1: Build a Component from Scratch

  • Todo app with specific requirements (add, delete, filter, persist to localStorage)
  • Data fetching component — fetch API data, show loading/error states, pagination
  • Search with debounce — input field that filters a list with debounce
  • Drag-and-drop list — reorderable list using only React state
  • Timer/Stopwatch — start, stop, reset, lap functionality
  • Multi-step form — with validation, back/forward, state preservation

Pattern 2: Fix Broken React Code

  • Stale closure in useEffect — timer showing wrong count
  • Infinite re-render loop — useEffect without proper deps
  • Missing key prop — list rendering bugs
  • Race condition in API calls — outdated responses overwriting fresh ones
  • Memory leak — unsubscribed event listeners or uncancelled fetch

Pattern 3: Implement a Feature in Existing Code

  • Add authentication guard to an existing app
  • Implement infinite scroll for a feed
  • Add real-time updates with polling or WebSocket
  • Create a custom hook that extracts duplicated logic

React Tasks You Should Practice Building (Pick 5)

  1. Autocomplete Search Component

    • Fetch suggestions from API as user types
    • Debounce input (300ms)
    • Keyboard navigation (up/down/enter)
    • Highlight matching text in suggestions
    • Handle loading and error states
  2. Kanban Board (Mini Trello)

    • Multiple columns (Todo, In Progress, Done)
    • Drag cards between columns
    • Add/edit/delete cards
    • State management with useReducer
  3. Infinite Scroll Feed

    • Fetch paginated data
    • Intersection Observer for scroll detection
    • Loading skeleton while fetching
    • Error retry
  4. Real-time Chat Interface

    • Message list with timestamps
    • Input with send on Enter
    • Auto-scroll to bottom on new message
    • "User is typing..." indicator
  5. Modal/Dialog System

    • Portal-based rendering
    • Keyboard trap (Tab, Escape)
    • Click-outside-to-close
    • Animation on open/close
    • Nested modals support
  6. Custom Table with Sort & Filter

    • Column-wise sorting (asc/desc)
    • Multi-field filtering
    • Pagination with page size selector
    • Responsive layout
  7. File Upload with Progress

    • Drag-and-drop zone
    • Multiple file selection
    • Upload progress bar
    • Cancel upload
    • File type validation

React Coding Patterns to Have Ready

// Pattern 1: Custom Hook for API fetching function useFetch(url) { const [data, setData] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { const abortController = new AbortController(); const fetchData = async () => { try { setLoading(true); const res = await fetch(url, { signal: abortController.signal }); if (!res.ok) throw new Error(`HTTP ${res.status}`); const json = await res.json(); setData(json); } catch (err) { if (err.name !== 'AbortError') setError(err); } finally { setLoading(false); } }; fetchData(); return () => abortController.abort(); // Cleanup! }, [url]); return { data, loading, error }; }
// Pattern 2: Debounced Input function useDebounce(value, delay = 300) { const [debounced, setDebounced] = useState(value); useEffect(() => { const timer = setTimeout(() => setDebounced(value), delay); return () => clearTimeout(timer); }, [value, delay]); return debounced; }
// Pattern 3: useReducer for complex state const initialState = { items: [], filter: 'all', loading: false }; function reducer(state, action) { switch (action.type) { case 'ADD_ITEM': return { ...state, items: [...state.items, action.payload] }; case 'REMOVE_ITEM': return { ...state, items: state.items.filter(i => i.id !== action.payload) }; case 'SET_FILTER': return { ...state, filter: action.payload }; case 'SET_LOADING': return { ...state, loading: action.payload }; default: return state; } }

9. Django/Python Crash Course

[!IMPORTANT] This is your biggest gap. The JD explicitly asks for Django + Python. Your backend experience is Node/Express. You need to learn enough Django to hold a conversation and potentially debug Django code. You do NOT need to become an expert — just enough to show you can pick it up.

Django Basics You Must Know

Project Structure

myproject/ ā”œā”€ā”€ manage.py # CLI tool for Django commands ā”œā”€ā”€ myproject/ │ ā”œā”€ā”€ settings.py # Configuration (DB, middleware, apps) │ ā”œā”€ā”€ urls.py # URL routing (like Express routes) │ ā”œā”€ā”€ wsgi.py # WSGI entry point │ └── asgi.py # ASGI entry point (async) ā”œā”€ā”€ myapp/ │ ā”œā”€ā”€ models.py # Database models (like Prisma schema) │ ā”œā”€ā”€ views.py # Request handlers (like Express controllers) │ ā”œā”€ā”€ urls.py # App-specific routes │ ā”œā”€ā”€ serializers.py # DRF serializers (JSON ↔ Python objects) │ ā”œā”€ā”€ admin.py # Admin panel registration │ └── migrations/ # Database migration files

Django ORM vs Prisma (What You Already Know)

Prisma (Your Experience)Django ORM
prisma.user.findMany()User.objects.all()
prisma.user.findUnique({ where: { id } })User.objects.get(id=id)
prisma.user.create({ data: {...} })User.objects.create(**data)
prisma.user.update({ where, data })user.save() after modifying fields
prisma.user.delete({ where })user.delete()
include: { posts: true }select_related() / prefetch_related()
where: { age: { gte: 18 } }User.objects.filter(age__gte=18)

Django Models (Like Your Prisma Schema)

from django.db import models class Patient(models.Model): name = models.CharField(max_length=200) email = models.EmailField(unique=True) date_of_birth = models.DateField() created_at = models.DateTimeField(auto_now_add=True) # Like @default(now()) class Meta: ordering = ['-created_at'] class Appointment(models.Model): patient = models.ForeignKey(Patient, on_delete=models.CASCADE, related_name='appointments') doctor = models.ForeignKey('Doctor', on_delete=models.CASCADE) datetime = models.DateTimeField() status = models.CharField(max_length=20, choices=[ ('scheduled', 'Scheduled'), ('completed', 'Completed'), ('cancelled', 'Cancelled'), ]) class Meta: unique_together = ['doctor', 'datetime'] # Prevent double-booking!

Django REST Framework (DRF) — The Key Concepts

# serializers.py (converts between JSON ↔ Python objects) from rest_framework import serializers class PatientSerializer(serializers.ModelSerializer): class Meta: model = Patient fields = ['id', 'name', 'email', 'date_of_birth'] def validate_email(self, value): if Patient.objects.filter(email=value).exists(): raise serializers.ValidationError("Email already registered") return value # views.py (like Express route handlers) from rest_framework import viewsets, permissions from rest_framework.decorators import action from rest_framework.response import Response class PatientViewSet(viewsets.ModelViewSet): queryset = Patient.objects.all() serializer_class = PatientSerializer permission_classes = [permissions.IsAuthenticated] def get_queryset(self): # Role-based filtering — similar to your middleware approach! user = self.request.user if user.role == 'doctor': return Patient.objects.filter(appointments__doctor=user.doctor_profile) return Patient.objects.filter(user=user) # urls.py (like Express router) from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'patients', PatientViewSet) urlpatterns = router.urls

Express vs Django — Quick Translation Guide

Express (Your Knowledge)Django Equivalent
app.get('/api/users', handler)path('api/users/', views.user_list)
req.bodyrequest.data (DRF)
req.params.idkwargs['pk'] or URL capture group
req.query.searchrequest.query_params.get('search')
res.json({ data })Response(data)
res.status(404).json(...)Response(data, status=404)
Middleware functionDjango middleware class or DRF permission class
express.Router()django.urls.path() + include()
Prisma migrationspython manage.py makemigrations + migrate

Authentication in Django (vs Your JWT Approach)

# Django's built-in auth system from django.contrib.auth.models import User from rest_framework_simplejwt.tokens import RefreshToken # Similar to your JWT flow in Node.js: def login(request): user = authenticate(username=request.data['username'], password=request.data['password']) if user: refresh = RefreshToken.for_user(user) return Response({ 'access': str(refresh.access_token), 'refresh': str(refresh), })

Python Specifics to Know

  • List comprehensions: [x**2 for x in range(10) if x % 2 == 0]
  • Dictionary comprehensions: {k: v for k, v in items}
  • Generators: yield keyword, lazy evaluation
  • Decorators: @login_required, @api_view(['GET', 'POST']), custom decorators
  • Context managers: with open('file') as f:, custom __enter__/__exit__
  • Type hints: def greet(name: str) -> str:
  • *args and **kwargs: Variable arguments
  • Virtual environments: venv, pip, requirements.txt

10. React.js Deep Concepts

Advanced Topics That Could Come Up

React Fiber & Reconciliation

  • Fiber is React's reconciliation engine (React 16+)
  • Allows interrupting rendering work (time-slicing)
  • Priority-based updates (urgent vs non-urgent)
  • Explains why key is important for efficient diffing

React 18 Features

  • Automatic Batching — all state updates batched by default
  • Transitions — useTransition, startTransition for non-urgent updates
  • Suspense for Data Fetching — with streaming SSR
  • Concurrent Features — useDeferredValue

Performance Optimization

  • React.memo — skip re-render if props unchanged
  • useMemo — memoize expensive computations
  • useCallback — stable function references
  • Code splitting with React.lazy + Suspense
  • Virtualization for long lists (react-window)

State Management Patterns

Local State (useState) → Component-level Lifted State → Parent-child communication Context API → App-wide state (theme, auth, locale) useReducer → Complex state transitions Redux/Zustand → Large-scale state with dev tools Server State (React Query/SWR) → API data caching

11. DSA — Targeted Topics

You're already strong here (1899 peak). Focus on medium-level recursion/backtracking since that's what was asked.

Priority Practice List (LeetCode Problems)

Recursion & Backtracking (HIGHEST PRIORITY)

#ProblemDifficulty
46PermutationsMedium
47Permutations II (with duplicates)Medium
78SubsetsMedium
90Subsets IIMedium
39Combination SumMedium
40Combination Sum IIMedium
22Generate ParenthesesMedium
79Word SearchMedium
51N-QueensHard
37Sudoku SolverHard
131Palindrome PartitioningMedium
17Letter Combinations of Phone NumberMedium
93Restore IP AddressesMedium
77CombinationsMedium

General Medium DSA (Backup)

#ProblemTopic
200Number of IslandsBFS/DFS
56Merge IntervalsSorting
153SumTwo Pointers
3Longest Substring Without RepeatingSliding Window
102Binary Tree Level Order TraversalBFS
236Lowest Common AncestorTrees
146LRU CacheDesign + HashMap + DLL
207Course ScheduleTopological Sort

How to Present Your Solution (Morphle Style)

Since Morphle values reasoning over pattern-matching:

  1. Clarify — "So the input is... and we need to find..."
  2. Brute Force First — "The naive approach would be... with O(n!) time"
  3. Identify Optimization — "We can prune branches when..."
  4. Code It — Clean, readable code
  5. Test It — Walk through with a small example
  6. Analyze — Time and space complexity

12. Operating Systems & Concurrency

Complete Topic Checklist

Processes & Threads

  • Process vs Thread differences
  • Process states (New, Ready, Running, Waiting, Terminated)
  • Thread models (User-level vs Kernel-level)
  • Context switching — what's saved/restored
  • PCB (Process Control Block) contents
  • Fork, exec, wait system calls

CPU Scheduling

  • FCFS, SJF, Priority, Round Robin
  • Preemptive vs Non-preemptive
  • Convoy effect, starvation
  • Multilevel feedback queue

Process Synchronization (CRITICAL FOR CTO ROUND)

  • Critical Section Problem — requirements (mutual exclusion, progress, bounded waiting)
  • Peterson's Solution
  • Test-and-Set, Compare-and-Swap (hardware solutions)
  • Semaphores — binary and counting
  • Mutex vs Semaphore
  • Monitor — condition variables, wait/signal
  • All classic problems (Producer-Consumer, Reader-Writer, Dining Philosophers)

Deadlock

  • Four necessary conditions
  • Resource Allocation Graph
  • Banker's Algorithm (Safety algorithm + Resource-request algorithm)
  • Deadlock detection and recovery
  • Ostrich algorithm

Memory Management

  • Paging vs Segmentation
  • Page Table, TLB
  • Page Replacement algorithms (FIFO, LRU, Optimal)
  • Thrashing — causes and solutions
  • Virtual Memory

File Systems & I/O (Lower Priority)

  • File allocation methods (contiguous, linked, indexed)
  • Disk scheduling (FCFS, SSTF, SCAN, C-SCAN)

13. REST API Design & Backend Concepts

Topics to Know

REST Principles

  • Resource-based URLs (/api/patients/123, not /api/getPatient?id=123)
  • HTTP methods semantics (GET=read, POST=create, PUT=update, PATCH=partial update, DELETE=remove)
  • Status codes: 200, 201, 204, 400, 401, 403, 404, 409, 422, 500
  • Idempotency (GET, PUT, DELETE are idempotent; POST is not)
  • HATEOAS (know what it is, even if you don't implement it)

Authentication & Authorization

  • JWT structure (header.payload.signature)
  • Access token vs Refresh token
  • Token storage (httpOnly cookies vs localStorage — tradeoffs)
  • OAuth 2.0 flow basics
  • RBAC (Role-Based Access Control) — you already built this!

Database Concepts

  • SQL JOINs (INNER, LEFT, RIGHT, FULL)
  • Indexing — B-tree, when to add, when NOT to add
  • Transactions — ACID properties
  • N+1 query problem — how to solve with eager loading
  • Database normalization (1NF, 2NF, 3NF, BCNF)
  • SQL vs NoSQL — when to use what

Caching

  • Cache-aside (Lazy Loading) vs Write-through vs Write-behind
  • TTL (Time to Live)
  • Cache invalidation strategies
  • Redis data structures (Strings, Hashes, Lists, Sets, Sorted Sets)
  • When NOT to cache

System Design Basics (Lightweight)

  • Load balancing (Round Robin, Least Connections)
  • Horizontal vs Vertical scaling
  • Message queues (you already know BullMQ!)
  • Rate limiting algorithms (Token Bucket, Sliding Window)
  • Circuit breaker pattern (you implemented this!)

14. Project Pitch Scripts

Patient Management System — 2-Minute Pitch

"I built a Patient Management System using React, Node.js, Express, PostgreSQL, and Prisma ORM. The core challenge was enforcing strict data isolation between doctors and patients — a doctor should only see their own patients' records, and patients can only view their own data.

I implemented this with server-side middleware that intercepts every API request, extracts the user's role from the JWT, and validates that the requested resource belongs to them. This is more secure than client-side checks because you can't bypass it.

The trickiest part was the appointment booking engine. When two patients try to book the same doctor at the same time, you get a race condition. I solved this with server-side conflict resolution using database-level unique constraints plus application-level checking in a transaction, so even under concurrent requests, you never get a double-booking.

I also built an automated missed-dose detection system that monitors prescription schedules and flags when a patient hasn't logged their medication — which ties into compliance tracking.

If I were rebuilding this for a company like Morphle, I'd add real-time notifications via WebSockets, audit logging for medical compliance, and I'd consider Django REST Framework since it has built-in support for permissions that maps well to healthcare access patterns."

Distributed Webhook Engine — 2-Minute Pitch

"I built a distributed webhook delivery engine that can sustain over 1000 requests per second. The key architectural decision was decoupling event ingestion from delivery using a BullMQ job queue backed by Redis.

When an event comes in, we immediately acknowledge it and push a job to the queue. Worker processes pick up jobs and deliver webhooks to subscriber endpoints. This means if a subscriber is slow, it doesn't block other deliveries.

The most interesting component was the circuit breaker I designed with 3 states: Closed (normal), Open (failing endpoint is isolated), and Half-Open (testing if it's recovered). When an endpoint starts failing, the circuit opens and we stop hammering it — which prevents retry storms from cascading into the queue and starving healthy deliveries. I used exponential backoff with jitter for retries.

For security, every payload is signed with HMAC-SHA256 so subscribers can verify the webhook came from us. And I maintain an immutable PostgreSQL audit log tracking per-attempt latency, HTTP status, and failure traces.

I load-tested it with Artillery and it sustained 1080 req/sec at 126ms average latency with zero failures."


15. Your Strengths & Gap Analysis

Strength Map

AreaYour LevelConfidence
DSA / Problem Solving🟢 Expert (Knight 1899, 500+ LC)Very High
React.js🟢 Strong (3 projects)High
Node.js / Express🟢 Strong (internship + projects)High
REST API Design🟢 Strong (JWT, RBAC, caching)High
PostgreSQL / Prisma🟢 Strong (all projects)High
Redis / Caching🟢 Strong (URL shortener + internship)High
System Design Thinking🟢 Strong (webhook engine, circuit breaker)High
Docker🟔 ModerateMedium
Django / PythonšŸ”“ Gap (not on resume)Low
OS / Concurrency🟔 Academic knowledge, needs practiceMedium
Logical Puzzles🟔 Strong math, needs specific practiceMedium-High

Priority Study Plan

PriorityAreaTime to InvestWhy
šŸ”“ HIGHDjango/Python basics3-4 hoursJD explicitly requires it, your main gap
šŸ”“ HIGHOS Concurrency & Debugging3-4 hoursCTO round is the hardest, and most candidates fail here
🟔 MEDIUMLogical Puzzles2-3 hoursFirst filter, 20-minute time pressure
🟔 MEDIUMReact Hands-On Practice2-3 hoursBuild 2-3 components from scratch under time pressure
🟢 LOWDSA1-2 hoursAlready strong, just practice backtracking problems verbally
🟢 LOWProject Rehearsal1 hourPractice your pitch scripts out loud
🟢 LOWCEO Round Prep30 minsResearch Morphle products and prepare questions

[!CAUTION] Critical Reminders:

  1. Think out loud — Morphle explicitly values reasoning over memorized answers
  2. Don't give up — The CTO round candidate got credit for explaining reasoning even without a full solution
  3. Lead with Patient Management System — Healthcare project + healthcare company = instant relevance
  4. Address the Django gap proactively — "I haven't used Django in production, but I've built the same patterns in Express — here's how the concepts map..."
  5. Be genuine in the CEO round — This round eliminated 50% of remaining candidates. Authenticity matters.

šŸ“š Resource Links

ResourcePurpose
BrainStellarLogical puzzles ranked by difficulty
GFG PuzzlesPuzzle practice
Django Official TutorialDjango basics
DRF QuickstartDjango REST Framework
React Docs (new)React fundamentals
OS Concurrency — GFGProcess synchronization
LeetCode Backtracking TagDSA practice
Souvik's Interview PostFirst-hand interview experience
Co-founder on HiringHiring philosophy
AmbitionBox MorphleInterview questions

Good luck, Omkumar! Your profile is a strong match. The DSA round is in your pocket, and your Patient Management System is a perfect card to play at a healthcare company. Focus your prep energy on Django basics and OS concurrency — those are the only areas where you need to level up. šŸš€