{"id":24061074,"url":"https://github.com/mondonno/algorithms","last_synced_at":"2025-02-26T14:26:15.364Z","repository":{"id":198393004,"uuid":"398053666","full_name":"Mondonno/algorithms","owner":"Mondonno","description":"Collection of resuable algorithm templates written in pure C++","archived":false,"fork":false,"pushed_at":"2023-10-05T07:30:40.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T07:16:55.506Z","etag":null,"topics":["algorithm","algorithms","all","cpp","data-structures","math","prefix-sumes","sorting","trees"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Mondonno.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}},"created_at":"2021-08-19T19:29:10.000Z","updated_at":"2023-08-26T14:34:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"5670fc2d-305a-432e-9f04-17fc256b6bb8","html_url":"https://github.com/Mondonno/algorithms","commit_stats":null,"previous_names":["mondonno/algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mondonno%2Falgorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mondonno%2Falgorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mondonno%2Falgorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mondonno%2Falgorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mondonno","download_url":"https://codeload.github.com/Mondonno/algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240869351,"owners_count":19870762,"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":["algorithm","algorithms","all","cpp","data-structures","math","prefix-sumes","sorting","trees"],"created_at":"2025-01-09T07:16:57.474Z","updated_at":"2025-02-26T14:26:15.326Z","avatar_url":"https://github.com/Mondonno.png","language":"C++","readme":"## Algorithms\nAlgorithms stuff created on my own, grabbed from some resources and all of them are putted here.\n\n## Methodology\n\nThis repository of ready-to-use algorithms follows a methodology that makes algorithms easy to find, extend and copy to your existing code.\nEvery algorithm that is here needs to be:\n\n- In separated file need to work sreperatly, without using any sources or algorithms from another one.\n- Easy to copy and paste into your own code.\n- Is supposed to be fast, not necessarily readable\n\n\u003e **Note**\u003cbr\u003e\n\u003e Usefull for creating memory-efficent algorithms are sizes of each types in C++, they are listed in [sizes file](./SIZES.md)\n\n## Tasks\n\nList of currently implemented algorithms:\n\n- **Prefix sums** Answers: `O(1)`\n    - [x] 2d sums `O(n * m)`\n    - [x] Normal sums `O(n)`\n    - [x] Sums on overlapping intervals `O(n)`\n\n- **Math**\n    - [x] Is a prime number `O(sqrt2(n))`\n    - [x] Euklides NWD `O(log2(max(n, k)))`\n    - [x] Euklides NWW `O(log2(max(n, k)))`\n    - [x] Advenced euklides `O(log2(max(n, k)))`\n    - [x] The sieve of Eratosthenes `O(n log2(log2(n)))`\n    - [ ] Number of dividers\n    - [ ] Remembered factorial\n    - [ ] Permutations\n\n- **Trees** `O(log2(n))`\n    - [x] Range-Range Tree\n    - [x] Point-to-Range Tree\n    - [x] Range-to-Point Tree\n\n- **Graphs**\n    - [x] Dijkstra algorithm `O(m log2(n))`\n    \u003c!-- N is count of rows | M is count of columns (or revertable)  --\u003e\n    - [x] BFS for:\n        - Graph `O(n+m)`\n        - Grid `O(n*m)`\n    - [x] DFS for:\n        - Graph: `O(n+m)`\n        - Grid `O(n*m)`\n\n- **Sparses**\n    - [x] Range Minimum Queries `O(n log n)` `O(1)`\n    - [x] Range Sum Queries (is simmilar to prefix sums but much slower)\n\n- **Other**\n    - [x] Caterpillar algorithm `O(2 * n)`\n    - [x] Merge sort `O(n log n)`\n    - [x] Binary Search `O(log2(n))`\n    - [x] Bubble sort `O(n^2)`\n\n### Credits\n\nThanks for help from various internet sources including software engineering forums and [CpAlgorithms](https://cp-algorithms.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondonno%2Falgorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmondonno%2Falgorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondonno%2Falgorithms/lists"}