Active problem-solving
Practice Prompts
Try it before you reveal. Each coding and system-design prompt unfolds in stages — approach, then solution — so you practice retrieval, not recognition. Mark what you solved; revisit the rest.
- CodeMid
Debounce a Flow (search input)
flowcoroutinesoperatorsGiven a
Flow<String>of search-box text, produce a stream that only emits after the user pauses typing for 300ms and skips duplicate consecutive queries. Then explain whyflatMapLatestis the right way to run the actual search.next: new - CodeSenior
Coroutine retry with exponential backoff
coroutinesresilienceWrite a generic
suspend fun <T> retry(times, initialDelay, maxDelay, factor, block)that retries a suspendblockon failure with exponential backoff, gives up aftertimesattempts, and never swallows cancellation.next: new - CodeSenior
Thread-safe LRU cache in Kotlin
kotlindata-structuresconcurrencyImplement a fixed-capacity LRU cache with O(1) get/put. Make it safe for concurrent coroutine access. What evicts, and how do you keep it O(1)?
next: new - CodeSenior
MVI reducer with a sealed Intent
mvistatekotlinModel a counter screen with MVI: an immutable
UiState, asealedIntent, and a purereduce(state, intent): state. Show why purity and immutability help testing.next: new - CodeMid
StateFlow counter ViewModel that survives process death
viewmodelsavedstatehandlestateWrite a ViewModel exposing a counter as
StateFlow<Int>that survives both rotation and process death, with increment/decrement. Which APIs guarantee each?next: new - CodeSenior
Offline-first repository (Room + network)
architectureroomflowImplement a repository where the UI observes Room (source of truth) and a
refresh()updates it from the network. Why does this give stale-while-revalidate for free?next: new - CodeMid
Safe JSON parsing with kotlinx.serialization
kotlinserializationerror-handlingParse an API response into a typed model with
kotlinx.serialization, tolerating unknown/extra fields, and return aResultrather than throwing into the UI. Why validate at the boundary?next: new - CodeSenior
Custom Compose Modifier: deferred-read offset
composeperformancemodifierYou animate an element's horizontal position from a fast-changing state. Show the version that recomposes every frame and the version that doesn't, and explain why.
next: new - DesignSenior
Design a real-time chat feature
architecturereal-timeoffline-firstDesign 1:1 chat: real-time delivery, message history, offline send, and read receipts. Cover transport, the data layer, ordering, and trade-offs.
next: new - DesignSenior
Design reliable image upload with an offline queue
workmanagerofflineresilienceUsers pick photos that must upload reliably even if the app is killed or offline. Design the queue, retries, progress, and constraints.
next: new - DesignArchitect
Design a feature-flag / experiment system
architectureexperimentationreleaseDesign client-side feature flags and A/B experiments: how flags are fetched, cached, evaluated, and kept consistent — plus kill switches and analytics. Trade-offs?
next: new - DesignSenior
Design analytics / event tracking on the client
architectureanalyticsbatchingDesign a client analytics pipeline: capture events, batch them, survive offline and process death, and avoid blocking the UI or draining battery. Trade-offs?
next: new - DesignMid
Design a token-bucket rate limiter for API calls
concurrencyresiliencekotlinYou must cap outgoing requests to N per second across the app, coroutine-safe. Sketch a token-bucket and how it integrates with OkHttp/coroutines. Trade-offs vs server-side limiting?
next: new - CodeMid
Implement a generic Result wrapper + safeApiCall
kotlincoroutineserror-handlingDesign a
sealedResult<out T>type for success/error, and asafeApiCallhelper that runs a suspend block on the IO dispatcher, returnsResult.Successon success andResult.Erroron failure — while correctly not swallowing coroutine cancellation.next: new - CodeSenior
ViewModel search with debounce + flatMapLatest
flowviewmodelstateIn a ViewModel, expose a
StateFlow<SearchUiState>driven by a query. Debounce input, cancel the in-flight search when the query changes, handle loading/empty/error, and survive rotation without re-running on every collector.next: new - DesignSenior
Design an offline-first news feed
architectureoffline-firstpagingDesign the architecture for a news feed that must load instantly, work offline, paginate infinitely, and stay fresh. Cover layers, the source of truth, pagination, sync, and the trade-offs.
next: new - DesignArchitect
Add on-device summarization to a notes app
on-device-aiprivacyarchitectureYou want a 'summarize this note' feature that runs on-device for privacy. Design it: model choice, device support, threading/streaming, fallback, and the privacy story.
next: new