-
Notifications
You must be signed in to change notification settings - Fork 48
cheatsheet-web-page #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yennanliu
wants to merge
6
commits into
master
Choose a base branch
from
cheatsheet-web-page
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Build job | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.2' | ||
| bundler-cache: true | ||
| cache-version: 0 | ||
|
|
||
| - name: Setup Pages | ||
| id: pages | ||
| uses: actions/configure-pages@v4 | ||
|
|
||
| - name: Build with Jekyll | ||
| run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | ||
| env: | ||
| JEKYLL_ENV: production | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
|
|
||
| # Deployment job | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| gem "github-pages", group: :jekyll_plugins | ||
| gem "jekyll-feed" | ||
| gem "jekyll-sitemap" | ||
|
|
||
| # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem | ||
| # and associated library. | ||
| platforms :mingw, :x64_mingw, :mswin, :jruby do | ||
| gem "tzinfo", ">= 1", "< 3" | ||
| gem "tzinfo-data" | ||
| end | ||
|
|
||
| # Performance-booster for watching directories on Windows | ||
| gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] | ||
|
|
||
| # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem | ||
| # do not have a Java counterpart. | ||
| gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # GitHub Pages configuration for CS_BASICS cheatsheets | ||
| title: CS_BASICS Cheatsheets | ||
| description: Computer Science fundamentals and coding interview cheatsheets | ||
| author: yennanliu | ||
| email: [email protected] | ||
|
|
||
| # Theme | ||
| theme: minima | ||
| markdown: kramdown | ||
| highlighter: rouge | ||
| plugins: | ||
| - jekyll-feed | ||
| - jekyll-sitemap | ||
|
|
||
| # Build settings | ||
| permalink: /:categories/:title/ | ||
| exclude: | ||
| - .gitignore | ||
| - README.md | ||
| - Gemfile | ||
| - Gemfile.lock | ||
| - node_modules | ||
| - vendor | ||
| - .bundle | ||
| - .sass-cache | ||
| - _site | ||
| - archived | ||
| - workspace | ||
| - algorithm/target | ||
| - "*.class" | ||
| - "*.jar" | ||
|
|
||
| # Collections for organizing content | ||
| collections: | ||
| cheatsheets: | ||
| output: true | ||
| permalink: /:collection/:name/ | ||
|
|
||
| # Defaults | ||
| defaults: | ||
| - scope: | ||
| path: "doc/cheatsheet" | ||
| type: "pages" | ||
| values: | ||
| layout: "default" | ||
| - scope: | ||
| path: "_cheatsheets" | ||
| type: "cheatsheets" | ||
| values: | ||
| layout: "default" | ||
|
|
||
| # Navigation | ||
| navigation: | ||
| - title: Home | ||
| url: / | ||
| - title: Cheatsheets | ||
| url: /cheatsheets/ | ||
| - title: GitHub | ||
| url: https://github.com/yennanliu/CS_basics | ||
|
|
||
| # GitHub Pages specific | ||
| repository: yennanliu/CS_basics | ||
| github: | ||
| repository_url: https://github.com/yennanliu/CS_basics | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| layout: default | ||
| title: Cheatsheets - CS Fundamentals | ||
| permalink: /cheatsheets/ | ||
| --- | ||
|
|
||
| # Computer Science Cheatsheets | ||
|
|
||
| This collection contains comprehensive cheatsheets covering all major computer science topics and algorithmic patterns essential for coding interviews and software development. | ||
|
|
||
| ## 📊 Data Structures | ||
|
|
||
| | Topic | Description | Link | | ||
| |-------|-------------|------| | ||
| | **Arrays** | Array operations, techniques, and patterns | [View]({{ site.baseurl }}/doc/cheatsheet/array.html) | | ||
| | **Binary Trees** | Tree traversal, construction, and manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/binary_tree.html) | | ||
| | **Binary Search Trees** | BST operations and balancing | [View]({{ site.baseurl }}/doc/cheatsheet/bst.html) | | ||
| | **Graphs** | Graph algorithms, traversal, and analysis | [View]({{ site.baseurl }}/doc/cheatsheet/graph.html) | | ||
| | **Hash Maps** | Hashing techniques and collision handling | [View]({{ site.baseurl }}/doc/cheatsheet/hash_map.html) | | ||
| | **Heaps** | Priority queues and heap operations | [View]({{ site.baseurl }}/doc/cheatsheet/heap.html) | | ||
| | **Linked Lists** | List operations and pointer manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/linkedlist.html) | | ||
|
|
||
| ## 🔍 Algorithm Patterns | ||
|
|
||
| | Pattern | Description | Link | | ||
| |---------|-------------|------| | ||
| | **Two Pointers** | Efficient array and string processing | [View]({{ site.baseurl }}/doc/cheatsheet/2_pointers.html) | | ||
| | **Binary Search** | Efficient searching in sorted data | [View]({{ site.baseurl }}/doc/cheatsheet/binary_search.html) | | ||
| | **Sliding Window** | Subarray and substring problems | [View]({{ site.baseurl }}/doc/cheatsheet/sliding_window.html) | | ||
| | **Backtracking** | Recursive problem solving | [View]({{ site.baseurl }}/doc/cheatsheet/backtrack.html) | | ||
| | **Dynamic Programming** | Optimization and memoization | [View]({{ site.baseurl }}/doc/cheatsheet/dp.html) | | ||
| | **Greedy Algorithms** | Local optimization strategies | [View]({{ site.baseurl }}/doc/cheatsheet/greedy.html) | | ||
|
|
||
| ## 🌐 Graph Algorithms | ||
|
|
||
| | Algorithm | Description | Link | | ||
| |-----------|-------------|------| | ||
| | **BFS (Breadth-First Search)** | Level-order traversal and shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/bfs.html) | | ||
| | **DFS (Depth-First Search)** | Deep exploration and connectivity | [View]({{ site.baseurl }}/doc/cheatsheet/dfs.html) | | ||
| | **Dijkstra's Algorithm** | Single-source shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/Dijkstra.html) | | ||
| | **Topological Sort** | Dependency resolution and ordering | [View]({{ site.baseurl }}/doc/cheatsheet/topological_sort.html) | | ||
|
|
||
| ## ⚡ Advanced Topics | ||
|
|
||
| | Topic | Description | Link | | ||
| |-------|-------------|------| | ||
| | **Bit Manipulation** | Bitwise operations and tricks | [View]({{ site.baseurl }}/doc/cheatsheet/bit_manipulation.html) | | ||
| | **System Design** | Scalability and architecture patterns | [View]({{ site.baseurl }}/doc/cheatsheet/design.html) | | ||
| | **Intervals** | Interval merging and scheduling | [View]({{ site.baseurl }}/doc/cheatsheet/intervals.html) | | ||
| | **Math & Geometry** | Mathematical algorithms and computations | [View]({{ site.baseurl }}/doc/cheatsheet/math.html) | | ||
|
|
||
| ## 💡 Problem-Solving Techniques | ||
|
|
||
| | Technique | Description | Link | | ||
| |-----------|-------------|------| | ||
| | **Pattern Recognition** | Common problem patterns and templates | [View]({{ site.baseurl }}/doc/cheatsheet/dp_pattern.html) | | ||
| | **Code Templates** | Reusable code patterns and structures | [View]({{ site.baseurl }}/doc/cheatsheet/00_template.html) | | ||
| | **Java Tricks** | Language-specific optimizations | [View]({{ site.baseurl }}/doc/cheatsheet/java_trick.html) | | ||
| | **Python Tricks** | Python-specific techniques | [View]({{ site.baseurl }}/doc/cheatsheet/python_trick.html) | | ||
|
|
||
| --- | ||
|
|
||
| ## 📋 Quick Reference | ||
|
|
||
| ### Time & Space Complexity Guide | ||
| - **O(1)** - Constant time operations | ||
| - **O(log n)** - Binary search, balanced trees | ||
| - **O(n)** - Linear traversal, single pass | ||
| - **O(n log n)** - Efficient sorting, divide & conquer | ||
| - **O(n²)** - Nested loops, brute force | ||
| - **O(2ⁿ)** - Exponential, recursive backtracking | ||
|
|
||
| ### Common Data Structure Operations | ||
|
|
||
| | Structure | Access | Search | Insertion | Deletion | Space | | ||
| |-----------|---------|---------|-----------|----------|-------| | ||
| | Array | O(1) | O(n) | O(n) | O(n) | O(n) | | ||
| | Dynamic Array | O(1) | O(n) | O(1)* | O(n) | O(n) | | ||
| | Hash Table | N/A | O(1)* | O(1)* | O(1)* | O(n) | | ||
| | Binary Tree | O(log n)* | O(log n)* | O(log n)* | O(log n)* | O(n) | | ||
|
|
||
| *Average case performance | ||
|
|
||
| --- | ||
|
|
||
| *All cheatsheets are continuously updated with the latest patterns and techniques used in top-tier tech companies.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| layout: default | ||
| title: CS_BASICS - Computer Science Fundamentals | ||
| --- | ||
|
|
||
| # CS_BASICS - Computer Science Fundamentals | ||
|
|
||
| Welcome to the CS_BASICS documentation site! This repository contains comprehensive computer science fundamentals and coding interview preparation materials. | ||
|
|
||
| ## 📚 Available Resources | ||
|
|
||
| ### [Cheatsheets](/cheatsheets/) | ||
| Comprehensive cheatsheets covering all major computer science topics and algorithmic patterns: | ||
|
|
||
| - **Data Structures**: Arrays, Linked Lists, Trees, Graphs, Hash Tables | ||
| - **Algorithms**: Sorting, Searching, Dynamic Programming, Greedy Algorithms | ||
| - **Problem Patterns**: Two Pointers, Sliding Window, Backtracking, BFS/DFS | ||
| - **System Design**: Distributed Systems, Scalability, Database Design | ||
|
|
||
| ### Code Solutions | ||
| - **Python**: LeetCode solutions in Python | ||
| - **Java**: LeetCode solutions in Java | ||
| - **SQL**: Database problem solutions | ||
| - **Scala**: Functional programming solutions | ||
|
|
||
| ## 🎯 Quick Navigation | ||
|
|
||
| | Category | Description | Link | | ||
| |----------|-------------|------| | ||
| | **Algorithms** | Core algorithm implementations | [View](/algorithm/) | | ||
| | **Data Structures** | Fundamental data structure concepts | [View](/data_structure/) | | ||
| | **LeetCode Python** | Python problem solutions | [View](/leetcode_python/) | | ||
| | **LeetCode Java** | Java problem solutions | [View](/leetcode_java/) | | ||
| | **System Design** | System design concepts and examples | [View](/system_design/) | | ||
|
|
||
| ## 🔗 External Resources | ||
|
|
||
| - [LeetCode Profile](https://leetcode.com/) | ||
| - [Blind Curated 75](https://leetcode.com/list/xoqag3yj/) | ||
| - [Grind 75](https://www.techinterviewhandbook.org/grind75/) | ||
| - [NeetCode 150](https://neetcode.io/practice) | ||
|
|
||
| ## 📈 Complexity References | ||
|
|
||
| The repository includes visual references for: | ||
| - Big O complexity charts | ||
| - Common data structure operation costs | ||
| - Sorting algorithm complexities | ||
| - Algorithm performance comparisons | ||
|
|
||
| --- | ||
|
|
||
| *This site is automatically generated from the [CS_BASICS GitHub repository](https://github.com/yennanliu/CS_basics).* |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a placeholder email address. It should be replaced with a valid email or removed if not intended to be public. Leaving placeholder values in configuration can be misleading.