Skip to content

Commit 2de53ac

Browse files
committed
Add Coding Interview Fight Club: from-scratch mdBook with Night Owl theme
- Tree-structured mdBook (SUMMARY-driven sidebar) explaining the codebase - Chapter 1: Binary Search (all 22 problems) - full treatment - Chapter 2: Dynamic Programming (7 problems so far) - full treatment - Every problem: intuition, multiple approaches, 5-language code (Kotlin/Java/C++/typed Python/Rust) with @param/@return contracts, hand-traced dry runs, and math-backed complexity analysis - Night Owl theme (custom CSS + JS language tabs + copy buttons), MathJax math support, search, print - GitHub Actions workflow (mdbook.yml) deploying to GitHub Pages - All code samples verified by compiling/running Java, C++, Python, Rust; Kotlin sources compiled with kotlinc 2.1.20
1 parent a9f4564 commit 2de53ac

45 files changed

Lines changed: 8228 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/mdbook.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy mdBook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Install mdBook
24+
run: |
25+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.4/mdbook-v0.5.4-x86_64-unknown-linux-gnu.tar.gz | tar -xz
26+
sudo mv mdbook /usr/local/bin/
27+
mdbook --version
28+
- name: Build book
29+
working-directory: CodingInterviewFightClub
30+
run: mdbook build
31+
- name: Upload Pages artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: CodingInterviewFightClub/book
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
runs-on: ubuntu-latest
40+
needs: build
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Gradle / Kotlin
2+
.gradle/
3+
build/
4+
*.class
5+
*.jar
6+
.kotlin/
7+
8+
# IDE
9+
.idea/
10+
.vscode/
11+
*.iml
12+
13+
# mdBook build output (deployed by GitHub Actions)
14+
/book/
15+
/CodingInterviewFightClub/book/
16+
17+
# OS
18+
.DS_Store
19+
20+
# Misc binaries
21+
main
22+
minikube-darwin-amd64

‎CodingInterviewFightClub/book.toml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[book]
2+
title = "Coding Interview Fight Club"
3+
authors = ["Arpan Pathak"]
4+
language = "en"
5+
description = "A complete, deeply-explained, multi-language (Kotlin, Java, C++, Python, Rust) guide to the algorithm solutions in the Algorithms_Kotlin codebase. Every problem ships with intuition, multiple approaches, 5-language code annotated with @param/@return docs, hand-traced dry runs, and math-backed time & space complexity analysis."
6+
7+
[build]
8+
build-dir = "book"
9+
create-missing = false
10+
11+
[output.html]
12+
default-theme = "navy"
13+
preferred-dark-theme = "navy"
14+
mathjax-support = true
15+
git-repository-url = "https://github.com/arpanpathak/Algorithms_Kotlin"
16+
edit-url-template = "https://github.com/arpanpathak/Algorithms_Kotlin/edit/main/src/{path}"
17+
additional-css = ["theme/css/nightowl.css"]
18+
additional-js = ["theme/js/book.js"]
19+
no-section-label = true
20+
21+
[output.html.fold]
22+
enable = true
23+
level = 1
24+
25+
[output.html.search]
26+
limit-results = 20
27+
teaser-word-count = 30
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Summary
2+
3+
[Introduction](intro/introduction.md)
4+
5+
- [How To Read This Book](intro/how-to-read.md)
6+
- [The 5-Language Codebase](intro/the-codebase.md)
7+
8+
- [Reference: Big-O & Complexity Math](reference/complexity.md)
9+
10+
- [1. Binary Search](ch01-binary-search/index.md)
11+
- [1.0 Pattern Primer: The Binary Search Theorem](ch01-binary-search/pattern-primer.md)
12+
- [1.1 Koko Eating Bananas](ch01-binary-search/koko-eating-bananas.md)
13+
- [1.2 Capacity To Ship Packages Within D Days](ch01-binary-search/capacity-to-ship-packages.md)
14+
- [1.3 Find First And Last Position Of Target](ch01-binary-search/find-first-and-last-position.md)
15+
- [1.4 Find K Closest Elements](ch01-binary-search/find-k-closest-elements.md)
16+
- [1.5 Find Minimum In Rotated Sorted Array](ch01-binary-search/find-minimum-in-rotated-sorted-array.md)
17+
- [1.6 Find Peak Element](ch01-binary-search/find-peak-element.md)
18+
- [1.7 Find Peak Element (Safe Boundaries)](ch01-binary-search/find-peak-element-safe.md)
19+
- [1.8 First Bad Version](ch01-binary-search/first-bad-version.md)
20+
- [1.9 Guess Number Higher Or Lower](ch01-binary-search/guess-number-higher-or-lower.md)
21+
- [1.10 House Robber IV](ch01-binary-search/house-robber-iv.md)
22+
- [1.11 Kth Missing Positive Number](ch01-binary-search/kth-missing-positive-number.md)
23+
- [1.12 Median Of Two Sorted Arrays](ch01-binary-search/median-of-two-sorted-arrays.md)
24+
- [1.13 Peak Index In A Mountain Array](ch01-binary-search/peak-index-in-mountain-array.md)
25+
- [1.14 Random Pick With Weight](ch01-binary-search/random-pick-with-weight.md)
26+
- [1.15 Search A 2D Matrix](ch01-binary-search/search-a-2d-matrix.md)
27+
- [1.16 Search In Rotated Sorted Array II](ch01-binary-search/search-in-rotated-sorted-array-ii.md)
28+
- [1.17 Search In Rotated Sorted Array](ch01-binary-search/search-in-rotated-sorted-array.md)
29+
- [1.18 Search Insert Position](ch01-binary-search/search-insert-position.md)
30+
- [1.19 Single Element In A Sorted Array](ch01-binary-search/single-element-in-a-sorted-array.md)
31+
- [1.20 Valley Element](ch01-binary-search/valley-element.md)
32+
- [1.21 Apartment Hunting](ch01-binary-search/apartment-hunting.md)
33+
- [1.22 Closest Subsequence Sum](ch01-binary-search/closest-subsequence-sum.md)
34+
35+
- [2. Dynamic Programming](ch02-dynamic-programming/index.md)
36+
- [2.0 Pattern Primer: Organized Recursion](ch02-dynamic-programming/pattern-primer.md)
37+
- [2.1 Longest Common Substring](ch02-dynamic-programming/longest-common-substring.md)
38+
- [2.2 Minimum Edit Distance](ch02-dynamic-programming/minimum-edit-distance.md)
39+
- [2.3 Longest Common Subsequence](ch02-dynamic-programming/longest-common-subsequence.md)
40+
- [2.4 0/1 Knapsack](ch02-dynamic-programming/zero-one-knapsack.md)
41+
- [2.5 Unbounded Knapsack](ch02-dynamic-programming/unbounded-knapsack.md)
42+
- [2.6 Partition Equal Subset Sum](ch02-dynamic-programming/partition-equal-subset-sum.md)
43+
- [2.7 Maximum Product Subarray](ch02-dynamic-programming/maximum-product-subarray.md)

0 commit comments

Comments
 (0)