{"id":15047284,"url":"https://github.com/mhahnfr/42cursus-ft_containers","last_synced_at":"2025-10-04T07:30:31.952Z","repository":{"id":134235065,"uuid":"509445137","full_name":"mhahnFr/42cursus-ft_containers","owner":"mhahnFr","description":"Reimplementation of a few containers of the C++ standard library.","archived":true,"fork":false,"pushed_at":"2022-10-11T12:36:29.000Z","size":262,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-28T23:40:59.081Z","etag":null,"topics":["42projects","containers","cplusplus","cpp","cpp98","red-black-tree"],"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/mhahnFr.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-07-01T12:23:23.000Z","updated_at":"2022-11-25T15:52:11.000Z","dependencies_parsed_at":"2024-07-29T13:30:38.675Z","dependency_job_id":null,"html_url":"https://github.com/mhahnFr/42cursus-ft_containers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhahnFr%2F42cursus-ft_containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhahnFr%2F42cursus-ft_containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhahnFr%2F42cursus-ft_containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhahnFr%2F42cursus-ft_containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhahnFr","download_url":"https://codeload.github.com/mhahnFr/42cursus-ft_containers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235227462,"owners_count":18956137,"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":["42projects","containers","cplusplus","cpp","cpp98","red-black-tree"],"created_at":"2024-09-24T20:56:04.071Z","updated_at":"2025-10-04T07:30:26.661Z","avatar_url":"https://github.com/mhahnFr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to 42cursus-ft_containers!\nThis repository contains a project of the [42 school].\nThis project is about reimplementing some standard containers of the C++ standard library.\n\n## Overview\nThe containers implemented in this repository are:\n- `vector`\n- `map`\n- `stack`\n- `set` _(bonus part)_\n\nAdditionally, the following utilities had to be recoded:\n- `reverse_iterator`\n- `pair`\n- `make_pair`\n- `iterator_traits`\n- `enable_if`\n- `lexicographical_compare`\n\nThe general approach is quite simple: the reimplementation has to work exactly the same way as the real one.\nHowever, one is free to choose the type of the tree for the `map`.\n\nIf one wants to implement the `set` as a bonus, the use of a [Red-Black-Tree] is mandatory.\n\n## Approach\nFor the `vector`, `stack` and the utilities the approach is simple: just code them accordingly to the published\ndocumentation of C++98.\n\nAs the \"real\" `map` and `set` are using a [Red-Black-Tree], the reimplementation also has to use a\n[self-balancing binary-tree](https://en.wikipedia.org/wiki/Self-balancing_binary_search_tree).\n\nMy tree follows the requirements of the [Red-Black-Tree]. The most important rules of it:\n- Inserted nodes are **red**.\n- All paths through the tree must traverse the same amount of **black** nodes.\n- There must never be two **red** nodes following consecutively in a path through the tree.\n\nAccordingly, after an insertion or an erasing, the tree has to be rebalanced.\n\nIn order to be capable to iterate through the tree seamlessly, I added a beginning and an end sentinel.\nThey are treated as `NIL` nodes.\n\n### Final notes\nThis repository will not be developed any further.\n\n© Copyright 2022 [mhahnFr](https://www.github.com/mhahnFr)\n\n[42 school]: https://www.42heilbronn.de/learncoderepeat\n[Red-Black-Tree]: https://en.wikipedia.org/wiki/Red–black_tree\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhahnfr%2F42cursus-ft_containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhahnfr%2F42cursus-ft_containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhahnfr%2F42cursus-ft_containers/lists"}