https://github.com/gitmahin/time-complexity-reference
Provides a quick lookup for the time complexity of built-in data structure methods across multiple programming languages - useful for code reviews, and writing performant code.
https://github.com/gitmahin/time-complexity-reference
Last synced: 28 days ago
JSON representation
Provides a quick lookup for the time complexity of built-in data structure methods across multiple programming languages - useful for code reviews, and writing performant code.
- Host: GitHub
- URL: https://github.com/gitmahin/time-complexity-reference
- Owner: gitmahin
- License: mit
- Created: 2026-04-26T16:53:14.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-23T10:58:42.000Z (about 2 months ago)
- Last Synced: 2026-05-23T12:26:01.252Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://time-complexity-reference.vercel.app
- Size: 238 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time Complexity Reference
A clean, fast reference guide for the time complexity of built-in methods across popular programming languages.
## Overview
This site provides a quick lookup for the time complexity of built-in data structure methods across multiple programming languages - useful for code reviews, and writing performant code.
## Languages Covered
- [JavaScript / Node.js](https://time-complexity-reference.vercel.app/nodejs)
- [Python](https://time-complexity-reference.vercel.app/python)
- [Java](https://time-complexity-reference.vercel.app/java)
- [C++](https://time-complexity-reference.vercel.app/cpp)
- [C](https://time-complexity-reference.vercel.app/c)
- [C#](https://time-complexity-reference.vercel.app/csharp)
- [Rust](https://time-complexity-reference.vercel.app/rust)
## Features
- Per-language breakdown of data structure methods
- Color-coded complexity badges (O(1), O(n), O(log n), O(n log n), O(n²))
- Filterable by data structure (Array, Map, Set, Object, etc.)
- Syntax-highlighted code blocks
## Stack
- [Next.js](https://nextjs.org/) - App Router
- [MDX](https://mdxjs.com/) - Content via `next-mdx-remote`
- [Tailwind CSS](https://tailwindcss.com/) - Styling
- [shadcn/ui](https://ui.shadcn.com/) - UI components
- [Shiki](https://shiki.style/) - Code highlighting
## Contributing
```bash
git clone https://github.com/gitmahin/time-complexity-reference.git
cd time-complexity
npm install
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) in your browser.
### Want to add a language or fix a complexity entry? PRs are welcome.
1. Add your language data in `src/constants/data.constant.ts`
2. Create the corresponding MDX file in `src/content/`
3. Add the language to `listOfProgrammingLanguagesWithLinks` -> `src/constants/sidebar.constant.ts`
4. Open a pull request