Skip to content

Commit d357b04

Browse files
committed
add
1 parent 5b3e6af commit d357b04

File tree

5 files changed

+283
-0
lines changed

5 files changed

+283
-0
lines changed

.github/workflows/pages.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: '3.2'
36+
bundler-cache: true
37+
cache-version: 0
38+
39+
- name: Setup Pages
40+
id: pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Build with Jekyll
44+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
45+
env:
46+
JEKYLL_ENV: production
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
51+
# Deployment job
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

Gemfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
source "https://rubygems.org"
2+
3+
gem "github-pages", group: :jekyll_plugins
4+
gem "jekyll-feed"
5+
gem "jekyll-sitemap"
6+
7+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
8+
# and associated library.
9+
platforms :mingw, :x64_mingw, :mswin, :jruby do
10+
gem "tzinfo", ">= 1", "< 3"
11+
gem "tzinfo-data"
12+
end
13+
14+
# Performance-booster for watching directories on Windows
15+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
16+
17+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
18+
# do not have a Java counterpart.
19+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

_config.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# GitHub Pages configuration for CS_BASICS cheatsheets
2+
title: CS_BASICS Cheatsheets
3+
description: Computer Science fundamentals and coding interview cheatsheets
4+
author: yennanliu
5+
6+
7+
# Theme
8+
theme: minima
9+
markdown: kramdown
10+
highlighter: rouge
11+
plugins:
12+
- jekyll-feed
13+
- jekyll-sitemap
14+
15+
# Build settings
16+
permalink: /:categories/:title/
17+
exclude:
18+
- .gitignore
19+
- README.md
20+
- Gemfile
21+
- Gemfile.lock
22+
- node_modules
23+
- vendor
24+
- .bundle
25+
- .sass-cache
26+
- _site
27+
- archived
28+
- workspace
29+
- algorithm/target
30+
- "*.class"
31+
- "*.jar"
32+
33+
# Collections for organizing content
34+
collections:
35+
cheatsheets:
36+
output: true
37+
permalink: /:collection/:name/
38+
39+
# Defaults
40+
defaults:
41+
- scope:
42+
path: "doc/cheatsheet"
43+
type: "pages"
44+
values:
45+
layout: "default"
46+
- scope:
47+
path: "_cheatsheets"
48+
type: "cheatsheets"
49+
values:
50+
layout: "default"
51+
52+
# Navigation
53+
navigation:
54+
- title: Home
55+
url: /
56+
- title: Cheatsheets
57+
url: /cheatsheets/
58+
- title: GitHub
59+
url: https://github.com/yennanliu/CS_basics
60+
61+
# GitHub Pages specific
62+
repository: yennanliu/CS_basics
63+
github:
64+
repository_url: https://github.com/yennanliu/CS_basics

cheatsheets/index.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
layout: default
3+
title: Cheatsheets - CS Fundamentals
4+
permalink: /cheatsheets/
5+
---
6+
7+
# Computer Science Cheatsheets
8+
9+
This collection contains comprehensive cheatsheets covering all major computer science topics and algorithmic patterns essential for coding interviews and software development.
10+
11+
## 📊 Data Structures
12+
13+
| Topic | Description | Link |
14+
|-------|-------------|------|
15+
| **Arrays** | Array operations, techniques, and patterns | [View]({{ site.baseurl }}/doc/cheatsheet/array.html) |
16+
| **Binary Trees** | Tree traversal, construction, and manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/binary_tree.html) |
17+
| **Binary Search Trees** | BST operations and balancing | [View]({{ site.baseurl }}/doc/cheatsheet/bst.html) |
18+
| **Graphs** | Graph algorithms, traversal, and analysis | [View]({{ site.baseurl }}/doc/cheatsheet/graph.html) |
19+
| **Hash Maps** | Hashing techniques and collision handling | [View]({{ site.baseurl }}/doc/cheatsheet/hash_map.html) |
20+
| **Heaps** | Priority queues and heap operations | [View]({{ site.baseurl }}/doc/cheatsheet/heap.html) |
21+
| **Linked Lists** | List operations and pointer manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/linkedlist.html) |
22+
23+
## 🔍 Algorithm Patterns
24+
25+
| Pattern | Description | Link |
26+
|---------|-------------|------|
27+
| **Two Pointers** | Efficient array and string processing | [View]({{ site.baseurl }}/doc/cheatsheet/2_pointers.html) |
28+
| **Binary Search** | Efficient searching in sorted data | [View]({{ site.baseurl }}/doc/cheatsheet/binary_search.html) |
29+
| **Sliding Window** | Subarray and substring problems | [View]({{ site.baseurl }}/doc/cheatsheet/sliding_window.html) |
30+
| **Backtracking** | Recursive problem solving | [View]({{ site.baseurl }}/doc/cheatsheet/backtrack.html) |
31+
| **Dynamic Programming** | Optimization and memoization | [View]({{ site.baseurl }}/doc/cheatsheet/dp.html) |
32+
| **Greedy Algorithms** | Local optimization strategies | [View]({{ site.baseurl }}/doc/cheatsheet/greedy.html) |
33+
34+
## 🌐 Graph Algorithms
35+
36+
| Algorithm | Description | Link |
37+
|-----------|-------------|------|
38+
| **BFS (Breadth-First Search)** | Level-order traversal and shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/bfs.html) |
39+
| **DFS (Depth-First Search)** | Deep exploration and connectivity | [View]({{ site.baseurl }}/doc/cheatsheet/dfs.html) |
40+
| **Dijkstra's Algorithm** | Single-source shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/Dijkstra.html) |
41+
| **Topological Sort** | Dependency resolution and ordering | [View]({{ site.baseurl }}/doc/cheatsheet/topological_sort.html) |
42+
43+
## ⚡ Advanced Topics
44+
45+
| Topic | Description | Link |
46+
|-------|-------------|------|
47+
| **Bit Manipulation** | Bitwise operations and tricks | [View]({{ site.baseurl }}/doc/cheatsheet/bit_manipulation.html) |
48+
| **System Design** | Scalability and architecture patterns | [View]({{ site.baseurl }}/doc/cheatsheet/design.html) |
49+
| **Intervals** | Interval merging and scheduling | [View]({{ site.baseurl }}/doc/cheatsheet/intervals.html) |
50+
| **Math & Geometry** | Mathematical algorithms and computations | [View]({{ site.baseurl }}/doc/cheatsheet/math.html) |
51+
52+
## 💡 Problem-Solving Techniques
53+
54+
| Technique | Description | Link |
55+
|-----------|-------------|------|
56+
| **Pattern Recognition** | Common problem patterns and templates | [View]({{ site.baseurl }}/doc/cheatsheet/dp_pattern.html) |
57+
| **Code Templates** | Reusable code patterns and structures | [View]({{ site.baseurl }}/doc/cheatsheet/00_template.html) |
58+
| **Java Tricks** | Language-specific optimizations | [View]({{ site.baseurl }}/doc/cheatsheet/java_trick.html) |
59+
| **Python Tricks** | Python-specific techniques | [View]({{ site.baseurl }}/doc/cheatsheet/python_trick.html) |
60+
61+
---
62+
63+
## 📋 Quick Reference
64+
65+
### Time & Space Complexity Guide
66+
- **O(1)** - Constant time operations
67+
- **O(log n)** - Binary search, balanced trees
68+
- **O(n)** - Linear traversal, single pass
69+
- **O(n log n)** - Efficient sorting, divide & conquer
70+
- **O(n²)** - Nested loops, brute force
71+
- **O(2ⁿ)** - Exponential, recursive backtracking
72+
73+
### Common Data Structure Operations
74+
75+
| Structure | Access | Search | Insertion | Deletion | Space |
76+
|-----------|---------|---------|-----------|----------|-------|
77+
| Array | O(1) | O(n) | O(n) | O(n) | O(n) |
78+
| Dynamic Array | O(1) | O(n) | O(1)* | O(n) | O(n) |
79+
| Hash Table | N/A | O(1)* | O(1)* | O(1)* | O(n) |
80+
| Binary Tree | O(log n)* | O(log n)* | O(log n)* | O(log n)* | O(n) |
81+
82+
*Average case performance
83+
84+
---
85+
86+
*All cheatsheets are continuously updated with the latest patterns and techniques used in top-tier tech companies.*

index.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: default
3+
title: CS_BASICS - Computer Science Fundamentals
4+
---
5+
6+
# CS_BASICS - Computer Science Fundamentals
7+
8+
Welcome to the CS_BASICS documentation site! This repository contains comprehensive computer science fundamentals and coding interview preparation materials.
9+
10+
## 📚 Available Resources
11+
12+
### [Cheatsheets](/cheatsheets/)
13+
Comprehensive cheatsheets covering all major computer science topics and algorithmic patterns:
14+
15+
- **Data Structures**: Arrays, Linked Lists, Trees, Graphs, Hash Tables
16+
- **Algorithms**: Sorting, Searching, Dynamic Programming, Greedy Algorithms
17+
- **Problem Patterns**: Two Pointers, Sliding Window, Backtracking, BFS/DFS
18+
- **System Design**: Distributed Systems, Scalability, Database Design
19+
20+
### Code Solutions
21+
- **Python**: LeetCode solutions in Python
22+
- **Java**: LeetCode solutions in Java
23+
- **SQL**: Database problem solutions
24+
- **Scala**: Functional programming solutions
25+
26+
## 🎯 Quick Navigation
27+
28+
| Category | Description | Link |
29+
|----------|-------------|------|
30+
| **Algorithms** | Core algorithm implementations | [View](/algorithm/) |
31+
| **Data Structures** | Fundamental data structure concepts | [View](/data_structure/) |
32+
| **LeetCode Python** | Python problem solutions | [View](/leetcode_python/) |
33+
| **LeetCode Java** | Java problem solutions | [View](/leetcode_java/) |
34+
| **System Design** | System design concepts and examples | [View](/system_design/) |
35+
36+
## 🔗 External Resources
37+
38+
- [LeetCode Profile](https://leetcode.com/)
39+
- [Blind Curated 75](https://leetcode.com/list/xoqag3yj/)
40+
- [Grind 75](https://www.techinterviewhandbook.org/grind75/)
41+
- [NeetCode 150](https://neetcode.io/practice)
42+
43+
## 📈 Complexity References
44+
45+
The repository includes visual references for:
46+
- Big O complexity charts
47+
- Common data structure operation costs
48+
- Sorting algorithm complexities
49+
- Algorithm performance comparisons
50+
51+
---
52+
53+
*This site is automatically generated from the [CS_BASICS GitHub repository](https://github.com/yennanliu/CS_basics).*

0 commit comments

Comments
 (0)