GitHub Coding Interview Questions
26 GitHub coding interview problems with full optimal solutions — 12 easy, 10 medium, 4 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an GitHub interviewer values, and a FAQ section.
Showing 10 problems of 26
- #12mediumfoundational
12. Number of Islands
BFS/DFS grid traversal that mirrors how GitHub models repository dependency graphs and connected component analysis.
- #13mediumfoundational
13. Clone Graph
Deep-clone a connected undirected graph using BFS/DFS, directly analogous to forking a repository and cloning its entire commit DAG.
- #14mediumfoundational
14. Course Schedule
Topological sort / cycle detection on a directed graph, directly modeling how GitHub Actions resolves job dependencies and detects circular workflow references.
- #15mediumfoundational
15. Longest Common Subsequence
Classic DP problem that underlies git diff and merge algorithms used daily at GitHub to compute edit distances between file versions.
- #16mediumfoundational
16. Pacific Atlantic Water Flow
Multi-source BFS/DFS on a grid to find cells reachable from both boundaries, testing bidirectional graph traversal skills GitHub values for diff and merge reachability.
- #17mediumfoundational
17. Implement Trie (Prefix Tree)
Build a trie supporting insert, search, and startsWith — the data structure behind GitHub's code search autocomplete and repository name prefix matching.
- #18mediumfoundational
18. Word Search
Backtracking DFS on a grid to find a word path, testing the same traversal and backtracking patterns used in code-search substring matching across file content.
- #19mediumfoundational
19. Find All Anagrams in a String
Sliding window with character frequency maps to find all anagram start indices — a pattern used in GitHub's fuzzy file-name and diff-string search.
- #23mediumfoundational
23. LRU Cache
Design an O(1) get/put LRU cache using a doubly-linked list plus hashmap — the exact caching strategy used in GitHub's object store and pack-file cache layers.
- #25mediumfoundational
25. Max Area of Island
Find the largest connected component in a binary grid using DFS — the same connected-components analysis used when GitHub calculates the largest contiguous change region in a pull request diff.
Related interview-prep guides
Microsoft Teams for Tech Interviews in 2026: The Complete Candidate Guide
Microsoft Teams is the default interview surface at any company running Office 365: Fortune 500, finance, healthcare, government tech, legacy enterprise. The recording-and-transcript reality changes the threat model versus Zoom, but the OS-level boundary that protects a modern desktop AI setup is the same. This is the candidate-side guide to running a Teams interview in 2026.