Single‑page cheat sheet that puts Binary Search, Sorting, Recursion, and Graph Traversal side‑by‑side. It’s designed for quick exam revision — concise, visual, and bilingual with Tamil slogans for recall.
📘 Algorithm Cheat Sheet — Exam Revision
| Algorithm | Storytelling (CUTE) Example | Traditional Definition & Steps | Complexity | Tamil Slogan |
|---|---|---|---|---|
| Binary Search | Revathi searches roll number in 1,000 results. Instead of scanning all, she “jumps to the middle” and halves the list each time. Finds it in 7 steps. | Find middle → compare → go left/right → repeat until found. | (O(\log n)) | “அதிர்ச்சி தான் கதையை உயிர்ப்பிக்கும்!” (Surprise brings life to the story!) |
| Sorting | Hostel mess plates stacked randomly. Students waste time. Bubble sort swaps until plates are ordered. Everyone finds plates quickly. | Compare adjacent → swap if needed → repeat until sorted. | (O(n^2)) (Bubble), (O(n \log n)) (Merge/Quick) | “ஒழுங்கு தான் வேகத்தை தரும்!” (Order brings speed!) |
| Recursion | Arun climbs stairs. Wonders how many ways for 5 steps. Learns to think smaller (4 steps, 3 steps). Solves by breaking into sub‑problems. | Function calls itself → base case → recursive case → combine results. | Depends (Factorial (O(n)), Fibonacci exponential without memoization). | “சிறியதைப் புரிந்தால் பெரியதை வெல்லலாம்!” (Understand the small, conquer the big!) |
| Graph Traversal (DFS/BFS) | Revathi explores hostel rooms. Senior suggests DFS (go deep) or BFS (level by level). She systematically visits all rooms. | DFS: stack/recursion → go deep. BFS: queue → level by level. | (O(V+E)) | “ஒவ்வொரு பாதையும், ஒவ்வொரு அனுபவமும்!” (Every path, every experience!) |
✨ Quick Exam Tips
- Binary Search: Always needs sorted input.
- Sorting: Know at least one simple (Bubble) and one efficient (Merge/Quick).
- Recursion: Identify base case clearly.
- Graph Traversal: BFS → shortest path; DFS → depth exploration.
🎉 Tamil revision slogan: “நான்கு கதைகள், ஒரு பக்கம் — தேர்வில் வெற்றி நிச்சயம்!” (Four stories, one page — exam success guaranteed!)
No comments:
Post a Comment