{"id":17465238,"url":"https://github.com/cankatabaci/implement-stack-using-2-queues","last_synced_at":"2025-03-28T07:40:27.410Z","repository":{"id":103722481,"uuid":"86076117","full_name":"cankatabaci/Implement-Stack-using-2-Queues","owner":"cankatabaci","description":"Implement stack using 2 queues simple C# edition","archived":false,"fork":false,"pushed_at":"2017-03-26T01:15:29.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T08:26:27.559Z","etag":null,"topics":["data-structures","queue","stack"],"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/cankatabaci.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":"2017-03-24T14:21:19.000Z","updated_at":"2021-11-05T08:04:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"3040f31e-6fe0-46e2-9a08-327860dc08a9","html_url":"https://github.com/cankatabaci/Implement-Stack-using-2-Queues","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/cankatabaci%2FImplement-Stack-using-2-Queues","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cankatabaci%2FImplement-Stack-using-2-Queues/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cankatabaci%2FImplement-Stack-using-2-Queues/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cankatabaci%2FImplement-Stack-using-2-Queues/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cankatabaci","download_url":"https://codeload.github.com/cankatabaci/Implement-Stack-using-2-Queues/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991561,"owners_count":20706125,"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":["data-structures","queue","stack"],"created_at":"2024-10-18T11:09:20.447Z","updated_at":"2025-03-28T07:40:27.404Z","avatar_url":"https://github.com/cankatabaci.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implement Stack using Two Queues\n\nThis project was coded for a StackOverflow for questions. The goal of the project is to make the stack using 2 queues.\n\n### Solution Ways\nThere are two ways to solve this I code version A on this project.\n Version A (efficient push):\n   - push:\n      enqueue in queue1\n\n  - pop:\n     while size of queue1 is bigger than 1, pipe dequeued items from queue1 into queue2\n     dequeue and return the last item of queue1, then switch the names of queue1 and queue2\n\nVersion B (efficient pop):\n  - push:\n    enqueue in queue2\n    enqueue all items of queue1 in queue2, then switch the names of queue1 and queue2\n  - pop:\n    deqeue from queue1\n\nProblem Source: http://stackoverflow.com/questions/688276/implement-stack-using-two-queues","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcankatabaci%2Fimplement-stack-using-2-queues","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcankatabaci%2Fimplement-stack-using-2-queues","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcankatabaci%2Fimplement-stack-using-2-queues/lists"}