DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.

← All Questions

Backend Engineering Questions

MediumMachine CodingBackend Engineering

Implement a Counting Semaphore

Problem Statement Implement a counting semaphore with Acquire(n) and Release(n) operations that blocks if not enough per...

234 views
HardMachine CodingBackend Engineering

Implement a Connection Pool

Problem StatementImplement a generic connection pool that manages reusable connections with Get(), Put(), and Close() op...

593 views
HardMachine CodingBackend Engineering

Implement Consistent Hashing

Problem Statement Implement consistent hashing for distributed cache/database sharding. Adding or removing a node should...

81 views
MediumMachine CodingBackend Engineering

Implement Fan-In Pattern: Merge Multiple Channels

Problem Statement Implement a fan-in function that merges N input channels into a single output channel. Close the outpu...

214 views
HardMachine CodingBackend Engineering

Implement Pub/Sub with Wildcard Topics

Problem Statement Implement a pub/sub system where subscribers can use wildcards. Subscribe("user.*") should receive eve...

68 views
HardMachine CodingBackend Engineering

Implement a Delayed Job Queue

Problem Statement Implement a job queue where jobs can be scheduled to run after a delay. Pop() should block until a job...

557 views
EasyTheoryBackend Engineering

Zap: High-Performance Structured Logging

Problem Statement Replace fmt.Printf with production-grade structured logging using Zap, the high-performance logger use...

120 views
MediumTheoryBackend Engineering

Struct Field Alignment and Memory Optimization

Problem Statement At a high-frequency trading firm, every byte matters. A poorly aligned struct wastes 40% memory. Expla...

33 views
EasyTheoryBackend Engineering

Viper: Configuration Management in Go

Problem Statement Implement 12-factor app configuration using Viper to read from files, environment variables, and flags...

49 views
HardTheoryBackend Engineering

GOMEMLIMIT and GOGC: Tuning Go Memory Management

Problem Statement Your Go service runs in a 2GB container but keeps getting OOM killed. Configure GOMEMLIMIT and GOGC to...

21 views
MediumTheoryBackend Engineering

sqlc: Type-Safe SQL in Go

Problem Statement GORM has runtime overhead and magic. Raw SQL has no type safety. Use sqlc to get compile-time verified...

33 views
MediumTheoryBackend Engineering

Gin Framework: Production Web APIs in Go

Problem Statement Build a production-ready REST API using Gin, the most popular Go web framework used by companies like...

41 views
EasyTheoryBackend Engineering

Cobra: Building CLI Applications in Go

Problem Statement Build a professional CLI application using Cobra, the framework behind kubectl, docker, and hugo. Pro...

339 views
MediumTheoryBackend Engineering

Production HTTP Client Configuration in Go

Problem Statement The default http.DefaultClient has no timeout and poor connection pool settings. Configure a productio...

61 views
MediumTheoryBackend Engineering

Sync Package: Mutex, RWMutex, Once, Cond, and Atomics

Problem Statement Master all synchronization primitives in Go's sync package for building thread-safe applications. syn...

18 views
EasyTheoryBackend Engineering

Slice vs Array: len(), cap(), and Growth Strategy

Problem Statement In a Google interview, you're asked to explain the fundamental differences between slices and arrays i...

13 views
MediumTheoryBackend Engineering

Channel Operations: Send, Receive, Close, and Select

Problem Statement Master all channel operations and their edge cases. This knowledge is essential for writing correct co...

20 views
MediumTheoryBackend Engineering

Goroutines: Scheduling, Blocking, and Best Practices

Problem Statement Understand how goroutines are scheduled, what causes blocking, and best practices for managing concurr...

15 views
MediumTheoryBackend Engineering

Context Package: Complete Interview Guide

Problem Statement Master context.Context for cancellation, timeouts, and request-scoped values in Go applications. Cont...

32 views
EasyTheoryBackend Engineering

Map Internals: Iteration, Memory, and Concurrent Access

Problem Statement Explain the internal behavior of Go maps, including iteration order, memory management, and concurrent...

19 views
HardMachine CodingBackend Engineering

Implement errgroup from Scratch

Problem Statement At Uber, we need to fetch data from multiple microservices concurrently. If any service fails, we shou...

39 views
HardMachine CodingBackend Engineering

Implement a Thread-Safe LRU Cache

Problem Statement Design and implement a thread-safe LRU (Least Recently Used) cache with O(1) Get and Put operations. T...

114 views
HardMachine CodingBackend Engineering

Implement a Token Bucket Rate Limiter

Problem Statement Your API gateway at Stripe needs to limit requests to 100 per second per user. Implement a thread-safe...

84 views
MediumTheoryBackend Engineering

Understanding Slice Internals and Memory Leaks

Problem Statement A Datadog engineer discovers their Go service is consuming 10x more memory than expected. The culprit:...

26 views
MediumTheoryBackend Engineering

Using sync.Pool to Reduce GC Pressure

Problem Statement Your JSON API service allocates and discards thousands of byte buffers per second, causing GC pauses....

22 views
HardMachine CodingBackend Engineering

Implement a Circuit Breaker Pattern

Problem Statement At Netflix, when a downstream service is unhealthy, we need to fail fast instead of waiting for timeou...

43 views
MediumTheoryBackend Engineering

Master the Context Package: Cancellation, Timeouts, and Values

Problem Statement At Netflix, a single user request fans out to 50+ microservices. If the user cancels their request (cl...

15 views
HardTheoryBackend Engineering

Go Interface Internals: iface vs eface and the Nil Trap

Problem Statement A production bug at Cloudflare caused a nil pointer panic despite a nil check passing. The root cause...

14 views
HardTheoryBackend Engineering

Escape Analysis: Stack vs Heap Allocation in Go

Problem Statement Your Go microservice is generating excessive garbage, causing GC pressure. Using escape analysis, dete...

26 views
HardTheoryBackend Engineering

Go Garbage Collection: Tri-Color Mark and Sweep

Problem Statement Your high-frequency trading system written in Go has latency spikes every few seconds. Using GODEBUG,...

17 views
MediumDSABackend Engineering

Implement a Worker Pool Pattern in Go

Problem Statement At Uber, we process millions of ride requests daily. Each request involves geocoding, pricing calculat...

235 views
MediumTheoryBackend Engineering

Explain Channel Behavior: Nil, Closed, and Blocking

Problem Statement During a Google SRE interview, you're asked to explain the nuanced behavior of Go channels. A producti...

9 views
HardTheoryBackend Engineering

When to Use Mutex vs Channels for Synchronization

Problem Statement A Staff Engineer at Stripe asks: "We have a high-frequency payment counter that increments millions of...

23 views
HardTheoryBackend Engineering

Explain the Go Scheduler: G, M, P Model

Problem Statement In a Principal Engineer interview at Google, you're asked: "Explain how Go can run millions of gorouti...

28 views