A notebook for quick algorithms and data structures revision.
Visit: https://algonotebook.vercel.app/dashboard
The project also powers the Leetcode Assistant Chrome Extension.
- Quickly browse algorithms and data structures by category.
- Take notes with fully fledged markdown editor and save them to your account.
- Update problem status or save them to favorite list to keep track of your progress.
- Solution includes most of the main programming languages.
- Dark mode support.
- Next.js 13 using /app directory and server components
- Authentication with NextAuth.js
- MySQL database using Prisma ORM
- Tailwind CSS and Shadcn UI for styling and components
- Static data generation with Contentlayer and MDX
- Markdown editor with Editor.js
- Node.js
- Yarn
- MySQL database
- Clone the repository
- Install dependencies.
yarn install
-
Copy content of
.env.example
file to.env.local
and fill the environment variables. -
Generate content to static data (optional):
yarn contentlayer build
- Run the development server:
yarn dev
Run the following script to add new content:
yarn leetcode [leetcode link / problem slug] [category]
For example:
yarn leetcode https://leetcode.com/problems/reverse-linked-list/ linked-list
or
yarn leetcode reverse-linked-list linked-list
This will create a new markdown file in the content/problems/[category]
folder.
Now you can visit http://localhost:3000/problems/[category]/[problem-slug]
to see the new problem.
For example: https://algonotebook.vercel.app/problems/linked-list/reverse-linked-list
-
In folder
content/problems
there are folders for each category. Inside each category folder there are markdown files for each problem. To add a new problem, create a new markdown file (named as the problem separated bydashes
and with the extension.mdx
) inside the category folder and add the following frontmatter, for example:--- title: Reverse Linked List category: Linked List difficulty: Easy ---
Or you can use our snippet to generate the markdown template.
-
Run
yarn contentlayer build
to generate the static data.
To generate a new problem markdown template, you can use our snippet by following steps:
-
Copy the content of
mdx-snippet.json
file in the root directory. -
Open the command palette (Ctrl + Shift + P) and type
Configure User Snippets
. -
Find the
mdx.json
file and paste the content ofmdx-snippet.json
file from step 1. -
Now you can use the snippet by typing
algonotebook
and pressingTab
key.
- Arrays and Hashing
(8)
- Two Pointers
(3)
- Sliding Window
(4)
- Stack
(1)
- Binary Search
(2)
- Linked List
(6)
- Trees
(11)
- Tries
(3)
- Heap and Priority Queue
(1)
- Backtracking
(2)
- Graphs
(6)
- Advanced Graphs
(1)
- 1-D Dynamic Programming
(10)
- 2-D Dynamic Programming
(2)
- Greedy
(2)
- Intervals
(5)
- Math and Geometry
(3)
- Bit Manipulation
(5)
The following resources were used as reference for the content of this notebook:
MIT