Skip to content

Commit 0fe994d

Browse files
committed
add new pages: Patterns and Roadmap
1 parent dd5df27 commit 0fe994d

18 files changed

+1046
-34
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/public/icon.png" />
5+
<link rel="icon" type="image/svg+xml" href="/icon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>NeetCode Progress Tracker</title>
88
</head>

package-lock.json

Lines changed: 55 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"dependencies": {
1313
"lucide-react": "^0.544.0",
1414
"react": "^19.1.1",
15-
"react-dom": "^19.1.1"
15+
"react-dom": "^19.1.1",
16+
"react-router-dom": "^7.9.3"
1617
},
1718
"devDependencies": {
1819
"@eslint/js": "^9.36.0",

src/App.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
import NeetCodeTracker from "./NeetCodeTracker";
1+
import { BrowserRouter, Routes, Route } from "react-router-dom";
2+
import { NeetCodeTracker, Patterns, InterviewRoadmap } from "./pages";
3+
import { Navbar } from "./components";
24

35
const App = () => {
46
return (
5-
<NeetCodeTracker />
7+
<BrowserRouter>
8+
<Navbar />
9+
<Routes>
10+
<Route path="/" element={<NeetCodeTracker />} />
11+
<Route path="/patterns" element={<Patterns />} />
12+
<Route path="/roadmap" element={<InterviewRoadmap />} />
13+
</Routes>
14+
</BrowserRouter>
615
);
716
};
817

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ const Filters = ({
1313
<div className="bg-white rounded-lg shadow-lg p-6 mb-6 transition-colors">
1414
<div className="flex items-center gap-2 mb-4">
1515
<Filter size={20} className="text-gray-600" />
16-
<h2 className="text-xl font-semibold text-gray-800">
17-
Filters
18-
</h2>
16+
<h2 className="text-xl font-semibold text-gray-800">Filters</h2>
1917
</div>
2018
<div className="grid grid-cols-1 md:grid-cols-3 gap-5 items-center">
2119
<div>
2220
<label className="block text-sm font-medium text-gray-700 mb-2">
2321
Category
2422
</label>
2523
<select
24+
title="Category"
2625
value={filterCategory}
2726
onChange={(e) => setFilterCategory(e.target.value)}
2827
className="w-full p-2 border border-gray-300 rounded bg-white text-gray-900 focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors"
@@ -39,24 +38,23 @@ const Filters = ({
3938
Difficulty
4039
</label>
4140
<select
41+
title="Difficulty"
4242
value={filterDifficulty}
4343
onChange={(e) => setFilterDifficulty(e.target.value)}
4444
className="w-full p-2 border border-gray-300 rounded bg-white text-gray-900 focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors"
4545
>
4646
{difficulties.map((diff) => (
47-
<option
48-
key={diff}
49-
value={diff}
50-
className="bg-white"
51-
>
47+
<option key={diff} value={diff} className="bg-white">
5248
{diff}
5349
</option>
5450
))}
5551
</select>
5652
</div>
5753
<div className="flex items-center gap-2 md:mt-6">
5854
<input
55+
id="due-today-checkbox"
5956
type="checkbox"
57+
title="Show Only Due Today"
6058
checked={showOnlyDueToday}
6159
onChange={() => setShowOnlyDueToday((prev) => !prev)}
6260
className="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded bg-white"

src/components/Navbar.jsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Link } from "react-router-dom";
2+
3+
const Navbar = () => (
4+
<nav className="bg-white shadow mb-6">
5+
<div className="max-w-7xl mx-auto px-4 py-3 flex gap-6">
6+
<Link to="/" className="font-bold text-blue-600">
7+
Tracker
8+
</Link>
9+
<Link to="/patterns" className="font-bold text-blue-600">
10+
Patterns
11+
</Link>
12+
<Link to="/roadmap" className="font-bold text-blue-600">
13+
Roadmap
14+
</Link>
15+
</div>
16+
</nav>
17+
);
18+
19+
export default Navbar;

src/components/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export { default as Navbar } from "./Navbar";
2+
export { default as Filters } from "./Filters";
3+
export { default as StatsCard } from "./StatsCard";
4+
export { default as ProblemTable } from "./ProblemTable";
5+
export { default as ExportImportControls } from "./ExportImportControls";

src/data/dsa-mindmap.json

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
{
2+
"title": "Data Structures & Algorithms Decision Tree",
3+
"description": "Follow the decision paths to choose the right approach",
4+
"sections": [
5+
{
6+
"id": "arrays",
7+
"title": "Arrays",
8+
"color": "bg-blue-500",
9+
"content": [
10+
{ "type": "info", "text": "Dynamic vs Static Arrays" },
11+
{ "type": "question", "text": "Searching - Is it sorted?" },
12+
{
13+
"type": "answer",
14+
"text": "Yes → Divide and Conquer - Binary Search O(log N)"
15+
},
16+
{
17+
"type": "answer",
18+
"text": "No → Will sorting help? If not, Linear Search O(n)"
19+
},
20+
{
21+
"type": "note",
22+
"text": "Fast access O(1), but O(n) on expanding memory"
23+
}
24+
]
25+
},
26+
{
27+
"id": "hash-tables",
28+
"title": "Hash Tables",
29+
"color": "bg-green-500",
30+
"content": [
31+
{
32+
"type": "info",
33+
"text": "Fast Access O(1), tradeoff: more memory O(n)"
34+
},
35+
{ "type": "question", "text": "Need to improve time complexity?" },
36+
{ "type": "answer", "text": "Yes → Use Hash Table for O(1) lookups" },
37+
{ "type": "question", "text": "Collision handling?" },
38+
{ "type": "answer", "text": "Chaining with Linked Lists" },
39+
{
40+
"type": "note",
41+
"text": "Could be O(n) with collisions and resizing (unlikely)"
42+
}
43+
]
44+
},
45+
{
46+
"id": "linked-lists",
47+
"title": "Linked Lists",
48+
"color": "bg-purple-500",
49+
"content": [
50+
{ "type": "info", "text": "Singly Linked List" },
51+
{ "type": "info", "text": "Doubly Linked List" },
52+
{
53+
"type": "use",
54+
"text": "Good for: Stacks, Queues, collision handling"
55+
},
56+
{
57+
"type": "note",
58+
"text": "O(n) for search, O(1) for insertion/deletion at known position"
59+
}
60+
]
61+
},
62+
{
63+
"id": "stacks-queues",
64+
"title": "Stacks & Queues",
65+
"color": "bg-yellow-500",
66+
"content": [
67+
{
68+
"type": "info",
69+
"text": "Stack: LIFO - Array or Linked List implementation"
70+
},
71+
{
72+
"type": "info",
73+
"text": "Queue: FIFO - Linked List implementation (Array is BAD)"
74+
},
75+
{ "type": "use", "text": "Stacks: DFS, function calls, undo/redo" },
76+
{ "type": "use", "text": "Queues: BFS, task scheduling" }
77+
]
78+
},
79+
{
80+
"id": "trees",
81+
"title": "Trees",
82+
"color": "bg-red-500",
83+
"content": [
84+
{ "type": "info", "text": "Binary Tree, Binary Search Tree (BST)" },
85+
{ "type": "info", "text": "Balanced BST: AVL Tree, Red-Black Tree" },
86+
{ "type": "question", "text": "Tree Traversal? O(n)" },
87+
{ "type": "answer", "text": "Inorder (left, root, right)" },
88+
{ "type": "answer", "text": "Preorder (root, left, right)" },
89+
{ "type": "answer", "text": "Postorder (left, right, root)" },
90+
{ "type": "info", "text": "Trie: For string/prefix problems" }
91+
]
92+
},
93+
{
94+
"id": "graphs",
95+
"title": "Graphs",
96+
"color": "bg-indigo-500",
97+
"content": [
98+
{ "type": "question", "text": "Graph Traversal? O(n)" },
99+
{
100+
"type": "answer",
101+
"text": "DFS (Depth First Search) - Stack/Recursion"
102+
},
103+
{ "type": "answer", "text": "BFS (Breadth First Search) - Queue" },
104+
{ "type": "question", "text": "Shortest Path?" },
105+
{ "type": "answer", "text": "Unweighted → BFS" },
106+
{ "type": "answer", "text": "Weighted → Dijkstra or Bellman-Ford" },
107+
{
108+
"type": "info",
109+
"text": "Consider: Directed/Undirected, Cyclic/Acyclic"
110+
}
111+
]
112+
},
113+
{
114+
"id": "heaps",
115+
"title": "Heaps & Priority Queues",
116+
"color": "bg-pink-500",
117+
"content": [
118+
{ "type": "info", "text": "Binary Heap (Min/Max Heap)" },
119+
{ "type": "info", "text": "Priority Queue implementation" },
120+
{ "type": "use", "text": "Finding K largest/smallest elements" },
121+
{ "type": "use", "text": "Median finding, scheduling problems" },
122+
{ "type": "note", "text": "Insert/Delete: O(log n), Get min/max: O(1)" }
123+
]
124+
},
125+
{
126+
"id": "sorting",
127+
"title": "Sorting Algorithms",
128+
"color": "bg-orange-500",
129+
"content": [
130+
{
131+
"type": "info",
132+
"text": "O(N log N): Quick Sort, Merge Sort, Heap Sort"
133+
},
134+
{
135+
"type": "info",
136+
"text": "O(n²): Bubble Sort, Insertion Sort, Selection Sort"
137+
},
138+
{
139+
"type": "info",
140+
"text": "O(n): Counting Sort, Radix Sort (special cases)"
141+
},
142+
{ "type": "question", "text": "When to sort?" },
143+
{
144+
"type": "answer",
145+
"text": "If sorted data makes problem easier (binary search, etc.)"
146+
}
147+
]
148+
},
149+
{
150+
"id": "dp",
151+
"title": "Dynamic Programming",
152+
"color": "bg-teal-500",
153+
"content": [
154+
{ "type": "info", "text": "Memoization (Top-Down)" },
155+
{ "type": "info", "text": "Tabulation (Bottom-Up)" },
156+
{ "type": "question", "text": "Can you use recursion?" },
157+
{ "type": "answer", "text": "Yes → Consider DP with memoization" },
158+
{
159+
"type": "note",
160+
"text": "⚠️ Be mindful of Space Complexity (Stack overflow)"
161+
},
162+
{
163+
"type": "use",
164+
"text": "Optimal substructure + overlapping subproblems"
165+
}
166+
]
167+
},
168+
{
169+
"id": "strings",
170+
"title": "String Problems",
171+
"color": "bg-cyan-500",
172+
"content": [
173+
{ "type": "question", "text": "String question?" },
174+
{ "type": "answer", "text": "Turn it into an Array ~ split()" },
175+
{
176+
"type": "answer",
177+
"text": "Consider using Hash Table for character frequency"
178+
},
179+
{ "type": "answer", "text": "Trie for prefix/suffix problems" },
180+
{ "type": "use", "text": "Sliding window for substrings" }
181+
]
182+
}
183+
]
184+
}

src/data/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export { default as problems } from "./problems.json";
2+
export { default as patterns } from "./patterns.json";
3+
export { default as interviewRoadmap } from "./interview-roadmap.json";
4+
export { default as dsaMindmap } from "./dsa-mindmap.json";

0 commit comments

Comments
 (0)