explaingit

shomali11/go-interview

4,686GoAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A collection of common software engineering interview problems, numbers, strings, trees, data structures, algorithms, each solved with tested Go code and organized into folders by category.

Mindmap

mindmap
  root((go-interview))
    Problem types
      Number problems
      String problems
      Tree problems
    Data structures
      Linked lists stacks
      Queues and sets
      Priority queues
    Algorithms
      A-star pathfinding
      Running median
      Postfix evaluation
    Format
      Go source files
      Tests per problem
      README index links
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study working Go solutions to classic interview problems like Fibonacci, palindromes, and binary tree inversion.

USE CASE 2

Use as a reference for implementing common data structures, linked lists, stacks, queues, priority queues, from scratch in Go.

USE CASE 3

Practice reading Go test files alongside implementations to learn idiomatic Go testing patterns.

USE CASE 4

Review algorithm implementations like A-star pathfinding or running median computation for interview preparation.

Tech stack

Go

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This repository is a collection of common technical interview problems, each one solved and tested in the Go programming language. It is aimed at people who are preparing for software engineering interviews and want to see working solutions alongside the code, rather than just pseudocode or explanations. The problems are organized into categories. Number problems cover things like checking whether a number is prime, computing Fibonacci sequences, detecting palindromes, and converting between number bases. String problems include reversing words in a sentence, grouping anagrams, and checking for palindromes. Data structure sections show implementations of linked lists, stacks, queues, trees, sets, and priority queues from scratch. There are also problems about trees specifically, such as inverting a binary tree, finding its height, and printing nodes level by level. Beyond the classic categories, the repo includes stream problems like computing a running average or median as new values arrive, and algorithm problems like A-star pathfinding. There is also a section on evaluations, covering things like solving postfix math expressions and handling repeating fractions. Each problem lives in its own subfolder with Go source files and tests. The README is essentially a structured table of contents with links to each subfolder, so you can jump directly to the problem you want to study. The license is MIT, meaning you can use or adapt the code freely. This is a study and reference resource, not a library meant to be imported into other projects.

Copy-paste prompts

Prompt 1
Walk me through the go-interview implementation of a running median algorithm and explain how it handles new values arriving in a stream.
Prompt 2
I have a Go interview coming up. Explain the binary tree problems in the go-interview repo and describe the approach for each one.
Prompt 3
How does the go-interview repo implement a priority queue in Go? Walk me through the code and explain the heap operations.
Prompt 4
I want to add my own interview problem following the go-interview structure, how should I organize the source file and test file?
Open on GitHub → Explain another repo

← shomali11 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.