Go — Interview questions
Array & String Algorithms
Algorithmic techniques over sequences in Go — two pointers, a stack, bracket matching, interval merging, and in-place compaction.
11 questions
Searching, Hashing & DP
Hash-map and set lookups, an LRU cache, dynamic programming, and brute-force search in Go — with complexity trade-offs.
8 questions
Atomics & the Memory Model
The sync/atomic package, CPU-level atomics, and the Go memory model with happens-before.
6 questions
Basics & Packages
How a Go program is structured — packages and imports, variable and constant declarations, basic types, zero values, iota, identifier visibility, and the build tools.
9 questions
Channels
Channel mechanics, sending on closed channels, select, and the context package.
21 questions
Go Concurrency
Goroutine cost, the GMP scheduler, run queues, work-stealing, syscall handling, and preemption in the Go runtime.
13 questions
Concurrency Patterns
Fan-out, worker pools, bounded concurrency, errgroup, HTTP connection pooling, and channel-vs-mutex trade-offs in Go.
14 questions
Control Flow
Go's control constructs — if/else with an init statement, the single for loop in all its forms, switch without fallthrough, range, and panic/recover.
6 questions
Data Modeling & Transactions
Schema normalization and denormalization, constraints, surrogate keys, document versus relational stores, OLAP versus OLTP, transaction isolation, row and optimistic locking, and database scaling.
18 questions
Slices, Maps & Strings
Go's built-in collections from the basics up — creating and indexing slices, slice expressions, the slice header, growth and aliasing, maps with the comma-ok check and iteration order, map internals and the nil map, and strings as immutable bytes.
25 questions
SQL & Indexing
PostgreSQL index internals and types, composite indexes, SQL aggregation, window functions, self- and anti-joins, table partitioning, and VACUUM.
22 questions
Containers & Kubernetes
Containers, Linux namespaces, cgroups, Kubernetes basics, and the pod process model.
5 questions
Error Handling in Go
Error handling in Go — wrapping, errors.Is/As, sentinel errors, defer cleanup, retry policies.
5 questions
Errors (Basics)
Errors as values in Go — returning and checking errors, errors.New and fmt.Errorf, the `if err != nil` idiom, and why an error is an ordinary value, not an exception.
4 questions
Functions
Functions in Go — multiple and named returns, variadic parameters, first-class function values, and recursion.
5 questions
Garbage Collection in Go
The tricolor mark-sweep collector, write barriers, GC pacing, and triggering collection.
8 questions
Goroutines
An intro to Go concurrency — the go keyword, what makes a goroutine lightweight, and waiting for a group of goroutines with sync.WaitGroup.
2 questions
Memory in Go
Stack versus heap allocation, escape analysis, forced heap allocation, new versus make, and cache locality.
8 questions
Messaging
Message brokers, Kafka, delivery guarantees, the outbox pattern, dead-letter queues, and idempotency in an event-driven system.
12 questions
Networking Protocols
TCP vs UDP, the HTTP request/response structure and its versions, and QUIC over HTTP/3.
3 questions
OS Internals & Processes
Operating-system internals for Go backend engineers — virtual memory, syscalls, processes, file descriptors, signals, the OOM killer, and CPU utilization.
9 questions
Go Performance
Profiling with pprof, bottleneck analysis, PGO, scaling strategies, testing, and mocking dependencies.
8 questions
Pointers
Pointers in Go — the `&` and `*` operators, value vs reference semantics, the nil pointer, and when a pointer is actually needed.
4 questions
The Go Runtime
Go runtime semantics — defer, panic/recover, initialization order, language subtleties.
9 questions
Scaling
Distributed rate limiting, caching and stampede protection, key generation, inter-service communication, and realtime transports.
10 questions
Caching at Scale
Cache tiers, read and write cache patterns, invalidation strategies, negative caching, cache stampede protection, and cache observability.
7 questions
Consistency and Distributed Transactions
The CAP theorem, consistency models, two- and three-phase commit, the TCC and SAGA patterns, and idempotency of distributed operations.
8 questions
Sharding and Replication
Sharding rationale, shard-key selection, hot keys, shard routing and rebalancing, cross-shard operations, replication, and the SQL versus NoSQL choice.
10 questions
System Design Methodology
How to run a system design interview — gathering functional and non-functional requirements, capacity estimation, availability budgets, API style choice, HLD versus LLD, and common pitfalls.
8 questions
Resilience and Latency
Latency and percentiles, timeouts and deadline propagation, retries with backoff and jitter, circuit breaker, bulkhead, backpressure, load shedding, and hedged requests.
9 questions
Scaling and Load Balancing
Vertical versus horizontal scaling, the scalability laws of Amdahl, Gustafson, and USL, load-balancing algorithms, session affinity, and service discovery.
8 questions
Structs & Methods
Structs and methods in Go — declaring structs, methods, value vs pointer receivers, embedding as composition, and the constructor idiom.
6 questions
Mutexes & Sync Primitives
Mutex and RWMutex, WaitGroup, Once, and goroutine-safe map access.
13 questions
Go Service Architecture
Layered and clean architecture, the direction of dependencies, the adapter pattern, DTO versus domain entity, and graceful shutdown.
7 questions
Interfaces & Type Identity
How interfaces are represented and dispatched, type assertions, typed nil, and the comparability of types.
13 questions
Values, Constants & Numbers
Integer types and overflow, signed vs unsigned, strings, runes and bytes, iota constants, and control flow.
7 questions