computer-science-tutor
Computer Science Subject Expert
Specialized knowledge for computer science studying, problem-solving, and note creation.
Topic Coverage
mindmap
root((Computer Science))
Algorithms
Sorting
Searching
Graph Algorithms
Dynamic Programming
Data Structures
Arrays & Lists
Trees & Graphs
Hash Tables
Heaps & Queues
Systems
Operating Systems
Networks
Databases
Theory
Complexity
Automata
Computability
Quick Reference Links
- Algorithm Patterns: See algorithms.md
- Data Structures: See data-structures.md
- Big-O Analysis: See big-o.md
Diagram Patterns
Algorithm Flowchart
flowchart TB
A[Start] --> B{Condition?}
B -->|Yes| C[Process A]
B -->|No| D[Process B]
C --> E[End]
D --> E
Data Structure Visualization
graph TB
subgraph "Binary Search Tree"
A((8)) --> B((3))
A --> C((10))
B --> D((1))
B --> E((6))
C --> F((14))
end
Sequence Diagram (API/Process)
sequenceDiagram
Client->>Server: Request
Server->>Database: Query
Database-->>Server: Results
Server-->>Client: Response
Problem-Solving Framework
Algorithm Design Steps
- Understand - Clarify inputs, outputs, constraints
- Examples - Work through 2-3 examples by hand
- Brute Force - Start with the obvious O(n²) or O(n!) solution
- Optimize - Apply patterns (two pointers, sliding window, etc.)
- Implement - Write clean, modular code
- Test - Edge cases (empty, single element, duplicates)
Common Patterns
| Pattern | Use When | Example |
|---|---|---|
| Two Pointers | Sorted array, find pairs | Two Sum (sorted) |
| Sliding Window | Contiguous subarray | Max sum subarray |
| Hash Map | O(1) lookups needed | Two Sum (unsorted) |
| BFS | Shortest path (unweighted) | Maze solving |
| DFS | Explore all paths | Permutations |
| Binary Search | Sorted data, find element | Search rotated array |
| Dynamic Programming | Overlapping subproblems | Fibonacci, Knapsack |
Code Template Patterns
Binary Search
def binary_search(arr, target):
left, right = 0, len(arr) - 1
while left <= right:
mid = (left + right) // 2
if arr[mid] == target:
return mid
elif arr[mid] < target:
left = mid + 1
else:
right = mid - 1
return -1 # Not found
BFS Template
from collections import deque
def bfs(start, target):
queue = deque([start])
visited = {start}
while queue:
node = queue.popleft()
if node == target:
return True
for neighbor in get_neighbors(node):
if neighbor not in visited:
visited.add(neighbor)
queue.append(neighbor)
return False
DFS Template
def dfs(node, visited):
if node in visited:
return
visited.add(node)
# Process node
for neighbor in get_neighbors(node):
dfs(neighbor, visited)
Complexity Quick Reference
| Operation | Array | Linked List | Hash Table | BST (avg) |
|---|---|---|---|---|
| Access | O(1) | O(n) | O(1) | O(log n) |
| Search | O(n) | O(n) | O(1) | O(log n) |
| Insert | O(n) | O(1) | O(1) | O(log n) |
| Delete | O(n) | O(1) | O(1) | O(log n) |
More from szeyu/vibe-study-skills
study-notes-creator
Create organized, visual study notes with folder structures, diagrams, and example-based learning from source materials (PDFs, lecture notes, documentation). Use when creating structured learning materials, exam preparation notes, or educational documentation. Triggers - organize study notes, create visual learning materials, generate notes with diagrams, exam prep notes, example-based learning.
158flashcard-creator
Create flashcards for spaced repetition learning, compatible with Anki import. Supports basic cards, cloze deletions, and mnemonic aids. Use when creating study flashcards, Anki decks, vocabulary cards, memorization aids, or spaced repetition materials from notes or topics. Triggers - create flashcards, make Anki cards, spaced repetition, memory cards, cloze deletion cards.
131exam-prep
Comprehensive exam preparation strategies and materials. Creates study schedules, review sheets, practice tests, and identifies weak areas. Use when preparing for exams, creating study plans, building review materials, or organizing exam preparation. Triggers - exam prep, test preparation, study schedule, review sheet, practice test, exam study plan.
105quiz-creator
Generate quizzes from study materials with multiple question types (MCQ, True/False, Fill-in-blank, Short answer, Matching). Supports difficulty levels and answer keys. Use when creating practice quizzes, test prep materials, self-assessment tools, or knowledge checks from notes, textbooks, or any learning content. Triggers - create quiz, generate questions, make practice test, knowledge assessment, quiz from notes.
66chemistry-tutor
Chemistry subject expertise for study notes, problem-solving, and explanations. Covers organic, inorganic, physical, and analytical chemistry. Provides reaction mechanisms, molecular diagrams, formulas, and worked examples. Use when studying chemistry topics, creating chemistry notes, solving chemistry problems, or explaining chemical concepts. Triggers - chemistry help, chemical reactions, organic chemistry, periodic table, stoichiometry, molecular structures.
57physics-tutor
Physics subject expertise for study notes, problem-solving, and explanations. Covers mechanics, electromagnetism, thermodynamics, waves, and modern physics. Provides diagrams, formulas, and step-by-step problem solutions. Use when studying physics topics, creating physics notes, solving physics problems, or explaining physical concepts. Triggers - physics help, mechanics, kinematics, forces, energy, electricity, magnetism, thermodynamics, waves.
52