AND

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.

Solved 0 / 17
Level
  1. CodeMid

    Debounce a Flow (search input)

    flowcoroutinesoperators

    Given 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 why flatMapLatest is the right way to run the actual search.

    next: new
  2. CodeSenior

    Coroutine retry with exponential backoff

    coroutinesresilience

    Write a generic suspend fun <T> retry(times, initialDelay, maxDelay, factor, block) that retries a suspend block on failure with exponential backoff, gives up after times attempts, and never swallows cancellation.

    next: new
  3. CodeSenior

    Thread-safe LRU cache in Kotlin

    kotlindata-structuresconcurrency

    Implement 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
  4. CodeSenior

    MVI reducer with a sealed Intent

    mvistatekotlin

    Model a counter screen with MVI: an immutable UiState, a sealed Intent, and a pure reduce(state, intent): state. Show why purity and immutability help testing.

    next: new
  5. CodeMid

    StateFlow counter ViewModel that survives process death

    viewmodelsavedstatehandlestate

    Write a ViewModel exposing a counter as StateFlow<Int> that survives both rotation and process death, with increment/decrement. Which APIs guarantee each?

    next: new
  6. CodeSenior

    Offline-first repository (Room + network)

    architectureroomflow

    Implement 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
  7. CodeMid

    Safe JSON parsing with kotlinx.serialization

    kotlinserializationerror-handling

    Parse an API response into a typed model with kotlinx.serialization, tolerating unknown/extra fields, and return a Result rather than throwing into the UI. Why validate at the boundary?

    next: new
  8. CodeSenior

    Custom Compose Modifier: deferred-read offset

    composeperformancemodifier

    You 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
  9. DesignSenior

    Design a real-time chat feature

    architecturereal-timeoffline-first

    Design 1:1 chat: real-time delivery, message history, offline send, and read receipts. Cover transport, the data layer, ordering, and trade-offs.

    next: new
  10. DesignSenior

    Design reliable image upload with an offline queue

    workmanagerofflineresilience

    Users pick photos that must upload reliably even if the app is killed or offline. Design the queue, retries, progress, and constraints.

    next: new
  11. DesignArchitect

    Design a feature-flag / experiment system

    architectureexperimentationrelease

    Design 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
  12. DesignSenior

    Design analytics / event tracking on the client

    architectureanalyticsbatching

    Design 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
  13. DesignMid

    Design a token-bucket rate limiter for API calls

    concurrencyresiliencekotlin

    You 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
  14. CodeMid

    Implement a generic Result wrapper + safeApiCall

    kotlincoroutineserror-handling

    Design a sealed Result<out T> type for success/error, and a safeApiCall helper that runs a suspend block on the IO dispatcher, returns Result.Success on success and Result.Error on failure — while correctly not swallowing coroutine cancellation.

    next: new
  15. CodeSenior

    ViewModel search with debounce + flatMapLatest

    flowviewmodelstate

    In 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
  16. DesignSenior

    Design an offline-first news feed

    architectureoffline-firstpaging

    Design 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
  17. DesignArchitect

    Add on-device summarization to a notes app

    on-device-aiprivacyarchitecture

    You 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