{"id":17728370,"url":"https://github.com/ramyhakam/egypt-microbus","last_synced_at":"2025-03-14T09:33:18.096Z","repository":{"id":129084621,"uuid":"439474901","full_name":"RamyHakam/egypt-microbus","owner":"RamyHakam","description":"How to optimize the load and unload of the MicroBus in Egypt","archived":false,"fork":false,"pushed_at":"2021-12-20T09:20:38.000Z","size":25,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-02T04:45:13.782Z","etag":null,"topics":["egypt","leetcode-solutions","microbus","problem-solving"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamyHakam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-12-17T22:25:23.000Z","updated_at":"2022-04-25T05:44:59.000Z","dependencies_parsed_at":"2023-04-28T04:30:21.223Z","dependency_job_id":null,"html_url":"https://github.com/RamyHakam/egypt-microbus","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/RamyHakam%2Fegypt-microbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamyHakam%2Fegypt-microbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamyHakam%2Fegypt-microbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamyHakam%2Fegypt-microbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamyHakam","download_url":"https://codeload.github.com/RamyHakam/egypt-microbus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243554554,"owners_count":20309953,"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":["egypt","leetcode-solutions","microbus","problem-solving"],"created_at":"2024-10-25T19:42:36.668Z","updated_at":"2025-03-14T09:33:18.083Z","avatar_url":"https://github.com/RamyHakam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Egypt MicroBus in PHP 😊🤓   ![](https://github.com/RamyHakam/egypt-microbus/workflows/Build/badge.svg)\n## How to Optimize load and unload the passengers in the Egyptian microBus 😍\n\n\nIn this repository you can find my view of How we can solve the load and unload issue in our traditional microBus.\n\nThis is just for kidding and learning purpose you can chalanage the sloution with different test cases as you want or propose a new one 😂👌🚀\n\nThis assumes that you have a microBus with a capacity of 15 people. and you can consider the microBus as any data structure that can hold 15 people.\n\n![MicroBy](https://user-images.githubusercontent.com/17661342/146622529-4f606a32-ea8e-46c2-a444-aaa51ecc5573.gif)\n\n## The main Problem ✋\n\nIn your wonderful trip using our traditional microBus in Egypt, You will find yourself struggling with some kind of a priority issue, Which you can describe as How we can optimize the passenger seats inside the microBus in a way to minimize the number of passenger moves when someone wants to get on or off at a stop station? 🤓 \n\n## So, How we can describe the problem to start solving it? 🤔\n\n- You have a microBus with a capacity of 15 people. \n- You decide which data structure you will use to represent the microBus.\n- You have a Traffic line that contain 100 stops\n- Each stop represents a station with a number from 1 to 100\n- The stops are arranged in a line, and each stop has a number of passengers that are waiting to get on the microBus.\n- The MicroBus is empty at the beginning of the trip.\n- The microBus can hold 15 people at most.\n- The microBus can stop at the next stop station if the number of passengers in the microBus is less than 15.\n- The microBus can stop at the next stop if a passenger(s) wants to get off at that station.\n- Each Passenger can only get on and off the microBus once.\n- Each Passenger has an id and a destination. Where the destination is the stop number where the passenger wants to get off.\n- Each Passenger has a move Counter. The move counter is the number of times the passenger has moved from one seat to anther.\n- Your task is to find the minimum number of moves that the passengers has to make to get all the passengers to their destinations.\n\n## Contribute!!\n\nYou are very welcomed if You want to Contribute 🥳 on that, And this is How :\n\n- Fork The Repo.📂\n- Create Your new Solution in a Class with The existing Name + your Name. 🚀\n- Create a Test Class for Your Solution.☑️✅\n- Extend `MainTest` Class to load the data from your input file 👌👌\n- Add/Copy a new Input file in `Tests\\Helper\\InputFiles` Exactly With Your Test Class Name Follow The same Format for Other files!. 👨\n- Validate Your Solution From Time and Space Complexity.⌛️🧪\n- Create a PR against The Repo 🥳\n- Let us discuss your solution in your PR 🥊🥊🥊\n- Done !! You are a Contributor now 🍻\n\n## License\nMIT\n\n**Free Software, Hell Yeah!**\n\n[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)\n\n[dill]: \u003chttps://github.com/joemccann/dillinger\u003e\n[git-repo-url]: \u003chttps://github.com/joemccann/dillinger.git\u003e\n[john gruber]: \u003chttp://daringfireball.net\u003e\n[df1]: \u003chttp://daringfireball.net/projects/markdown/\u003e\n[markdown-it]: \u003chttps://github.com/markdown-it/markdown-it\u003e\n[Ace Editor]: \u003chttp://ace.ajax.org\u003e\n[node.js]: \u003chttp://nodejs.org\u003e\n[Twitter Bootstrap]: \u003chttp://twitter.github.com/bootstrap/\u003e\n[jQuery]: \u003chttp://jquery.com\u003e\n[@tjholowaychuk]: \u003chttp://twitter.com/tjholowaychuk\u003e\n[express]: \u003chttp://expressjs.com\u003e\n[AngularJS]: \u003chttp://angularjs.org\u003e\n[Gulp]: \u003chttp://gulpjs.com\u003e\n\n[PlDb]: \u003chttps://github.com/joemccann/dillinger/tree/master/plugins/dropbox/README.md\u003e\n[PlGh]: \u003chttps://github.com/joemccann/dillinger/tree/master/plugins/github/README.md\u003e\n[PlGd]: \u003chttps://github.com/joemccann/dillinger/tree/master/plugins/googledrive/README.md\u003e\n[PlOd]: \u003chttps://github.com/joemccann/dillinger/tree/master/plugins/onedrive/README.md\u003e\n[PlMe]: \u003chttps://github.com/joemccann/dillinger/tree/master/plugins/medium/README.md\u003e\n[PlGa]: \u003chttps://github.com/RahulHP/dillinger/blob/master/plugins/googleanalytics/README.md\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framyhakam%2Fegypt-microbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framyhakam%2Fegypt-microbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framyhakam%2Fegypt-microbus/lists"}