Loading…
40+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes big o with go, slice as stack and queue, linked list go, sorting in go, and more.
Suggested path
Topics follow a teaching order. Each answer ends with a clear Next question control so you can move forward without hunting the list.
Data structures and algorithms interview questions in Go test both your CS fundamentals and your knowledge of Go's standard library. This module covers Big-O complexity for Go's built-in operations (slice append amortised O(1), map lookup/insert O(1), len() O(1) for slices and maps), implementing a stack and queue using a slice (Go has no built-in stack/queue — slices serve both roles with append and slice re-assignment), implementing a singly linked list as a Go struct, sorting with sort.Slice (the comparator function) and sort.Strings / sort.Ints for common cases, binary search with sort.Search, the two-pointer pattern for array problems (written idiomatically in Go), and hash map patterns for frequency counting and two-sum style problems. Every answer shows the complete, runnable Go code the interviewer expects — not pseudocode, not Python with Go syntax bolted on, but idiomatic Go using range, multiple assignment, and the standard library tools Go developers actually reach for.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–40 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–40 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q40.