{"id":26437003,"url":"https://github.com/rurangiza/dojo","last_synced_at":"2025-03-18T08:20:11.522Z","repository":{"id":155101543,"uuid":"484555398","full_name":"rurangiza/dojo","owner":"rurangiza","description":"Learning data structures and algorithms","archived":false,"fork":false,"pushed_at":"2024-06-17T10:23:07.000Z","size":25878,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-17T11:49:10.900Z","etag":null,"topics":["algorithms","data-structures"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rurangiza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-22T19:54:42.000Z","updated_at":"2024-06-17T10:23:10.000Z","dependencies_parsed_at":"2024-05-17T05:24:47.466Z","dependency_job_id":"a956e817-b70f-4440-aa66-810df1974f1e","html_url":"https://github.com/rurangiza/dojo","commit_stats":null,"previous_names":["arurangi/playground","rurangiza/playground","rurangiza/dojo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rurangiza%2Fdojo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rurangiza%2Fdojo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rurangiza%2Fdojo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rurangiza%2Fdojo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rurangiza","download_url":"https://codeload.github.com/rurangiza/dojo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181314,"owners_count":20411605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-structures"],"created_at":"2025-03-18T08:20:11.098Z","updated_at":"2025-03-18T08:20:11.512Z","avatar_url":"https://github.com/rurangiza.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to the Dojo\n\n![](./docs/Room_of_Spirit_and_Time.png)\n\n## Data Structures \u0026 Algorithms\n- [x] [Introduction to Data Structures](https://www.youtube.com/watch?v=X8h4dq9Hzq8)\n- [x] [Introduction to Algorithms](https://www.youtube.com/live/4oqjcKenCH8?si=58ALyCO1klKIUVnm)\n- [x] [What is a brute-force method](https://www.youtube.com/watch?v=kdTpUjd71G8)?\n- [x] [Big-O Notation](https://youtu.be/BgLTDT03QtU?si=wU584KDbMbWFgak3)\n\n\u003e [!Important]\n\u003e For each data structure, algorithm and technique, do the following:\n\u003e learn the theory and concepts, then implement it in code and finally solve **5 easy** problems.\n\n\n|||||\n|-|:-|:-:|:-:|\n||**Data Structures**: way of organizing data for easier processing|**Theory \u0026 Implementation**|**Exercices**|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Dynamic Arrays](https://en.wikipedia.org/wiki/Dynamic_array): order is important, fast read, fast back insert|[C](./src/theory/data_structures/vector.c) - [Python](./src/theory/data_structures/vector.py)|[Leetcode](https://leetcode.com/tag/array/)|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Linked-List](https://en.wikipedia.org/wiki/Linked_list): order not important, sequence matters, fast front/mid insert|[C](./src/theory/data_structures/singly-linked-list.c) - [Python](./src/theory/data_structures/singly-linked-list.py)|[Leetcode](https://leetcode.com/tag/linked-list/)|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)): frequent insert and remove at end = LIFO|[Python](./src/theory/data_structures/stack.ipynb)|[Leetcode](https://leetcode.com/tag/stack/)|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Queues](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)): frequent insert at end and remove from front = FIFO|[Python](./src/theory/data_structures/deque.ipynb)|[Leetcode](https://leetcode.com/tag/queue/)|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Hash Tables](https://en.wikipedia.org/wiki/Hash_table): order not important, no duplicates, fast read/write/search|[Notes](./src/theory/data_structures/hashmap.ipynb)|[Leetcode](https://leetcode.com/tag/hash-table/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Sets](https://en.wikipedia.org/wiki/Set_(abstract_data_type)): order not important, no duplicates, fast read/write/search, great to compare groups|||\n|||||\n||**Algorithms**: step by step instructions for completing a task|**Theory \u0026 Implementation**|**Exercices**|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Selection Sort](https://en.wikipedia.org/wiki/Selection_sort), [Bubble Sort](https://en.wikipedia.org/wiki/Bubble_sort), [Insertion Sort](https://www.youtube.com/watch?v=JU767SDMDvA) O(n^2)|[Notes](./src/theory/algorithms/sorting-quadratic.ipynb)|[Leetcode](https://leetcode.com/tag/heap-priority-queue/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Merge Sort](https://www.youtube.com/watch?v=4VqmGXwpLqc), [Quick Sort](https://youtu.be/Hoixgm4-P4M?si=OUJ7I-78ubkbnJtp) O(nlogn)|[Notes](./src/theory/algorithms/sorting-nlogn.ipynb)|[Leetcode](https://leetcode.com/tag/sorting/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Counting Sort](https://en.wikipedia.org/wiki/Counting_sort) [[2](https://www.youtube.com/watch?v=ZcUdXuzOzeU)] O(n) for limited range!|[Notes](./src/theory/algorithms/counting-sort.ipynb)|[Leetcode](https://leetcode.com/tag/counting-sort/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Bucket Sort](https://en.wikipedia.org/wiki/Bucket_sort) [[2](https://www.youtube.com/watch?v=rNdTWHQMvOk)] ||[Leetcode](https://leetcode.com/tag/bucket-sort/)|\n|\u003cul\u003e\u003cli\u003e- [x] \u003c/li\u003e\u003c/ul\u003e|[Binary Search](https://youtu.be/fDKIpRe8GW4?si=WGFySWh7-3bU_iPX)|[Python](./src/theory/algorithms/binary-search.ipynb)|[Leetcode](https://leetcode.com/tag/binary-search/)|\n|||||\n||**Techniques**: common ways of approaching common problems|**Theory \u0026 Implementation**|**Exercices**|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Two Pointers](https://www.youtube.com/watch?v=-gjxg6Pln50)||[Leetcode](https://leetcode.com/tag/two-pointers/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Prefix Sum](https://www.youtube.com/watch?v=7pJo_rM0z_s)||[Leetcode](https://leetcode.com/tag/prefix-sum/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Sliding Window](https://www.youtube.com/watch?v=p-ss2JNynmw)||[Leetcode](https://leetcode.com/tag/sliding-window/)|\n|||||\n||**Concepts**|**Theory \u0026 Concepts**|**Exercices**|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Recursion](https://youtube.com/playlist?list=PLgUwDviBIf0rGlzIn_7rsaR2FQ5e6ZOL9\u0026si=nf1SDr2ndMU5ENWB): function calling itself, required for trees, backtracking and dynamic programming||[Exercices](https://leetcode.com/tag/recursion/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Bit Manipulation](https://youtu.be/NLKQEOgBAnw?si=oVl3SgLRvITKuN7x): fast operates without extra space required||[Exercices](https://leetcode.com/tag/bit-manipulation/)|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|[Regular Expressions](https://youtu.be/NLKQEOgBAnw?si=oVl3SgLRvITKuN7x) / [2](https://realpython.com/regex-python/): quick match of complex patterns||[Exercices](https://www.hackerrank.com/domains/regex)|\n\n\n[Neetcode's Roadmap](https://neetcode.io/roadmap)\n\n## Codeforces\n[![Codeforces Rating of @arurangi](https://cfrating.baoshuo.dev/rating?username=arurangi\u0026style=for-the-badge)](https://codeforces/profile/arurangi)\n#### Topics per rating\n|||||||\n|-|-|:-:|:-|:-:|:-:|\n||Title |Rating|Topics|Notes|Exercices|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|Newbie|0 - 1199|- Modular Arithmetic\u003cbr\u003e- Basic knowledge of primes, multiples, divisors\u003cbr\u003e- Euclidean algorithm\u003cbr\u003e- Sieve of eatosthenes \u003cbr\u003e- Binary modular eponentiation\u003cbr\u003e- Combinatorics||Exercices|\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|Pupil|1200 - 1399||||\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|Specialist|1400 - 1599||||\n|\u003cul\u003e\u003cli\u003e- [ ] \u003c/li\u003e\u003c/ul\u003e|Expert|\u003e= 1600||||\n\n## Reminders in Python\n\n#### Converting list to dictionnary counter\n```python\nfrom collections import Counter\n\narray = [1, 2, 3, 4, 2, 2, 1, 4]\ncount = Counter(arr)\n# Counter({2: 3, 1: 2, 4: 2, 3: 1})\n```\n\n#### Declaring 2D array filled with zeros\n```python\nmat = [[0] * m for _ in range(n)]\n```\n#### Sorting tuples by key\n```python\ndata.sort(key=lambda x: x[0])\n```\n#### Walrus operator\n```python\nimport time\n\ndef do_something() -\u003e int:\n    sleep(1)\n    return 42\n\n# slow\nif do_something() == 42:\n    return do_something()\n\n# much better\nx = do_something()\nif x == 42:\n    return x\n\n# more concise, better? maybe\nif (x := do_something()) == 42:\n    return x\n```\n[⇪ **Back up**](#dojo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frurangiza%2Fdojo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frurangiza%2Fdojo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frurangiza%2Fdojo/lists"}