{"id":24974397,"url":"https://github.com/sweep76/cpplib","last_synced_at":"2025-08-24T06:32:58.138Z","repository":{"id":275081151,"uuid":"925010761","full_name":"Sweep76/CppLib","owner":"Sweep76","description":"C++ Library (Combo)","archived":false,"fork":false,"pushed_at":"2025-02-08T02:31:18.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:44:58.955Z","etag":null,"topics":["algorithms","cpp"],"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/Sweep76.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":"2025-01-31T03:44:19.000Z","updated_at":"2025-02-08T02:31:21.000Z","dependencies_parsed_at":"2025-01-31T04:35:48.381Z","dependency_job_id":null,"html_url":"https://github.com/Sweep76/CppLib","commit_stats":null,"previous_names":["sweep76/cpplib"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sweep76/CppLib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sweep76%2FCppLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sweep76%2FCppLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sweep76%2FCppLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sweep76%2FCppLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sweep76","download_url":"https://codeload.github.com/Sweep76/CppLib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sweep76%2FCppLib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271808344,"owners_count":24825460,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cpp"],"created_at":"2025-02-03T20:03:58.201Z","updated_at":"2025-08-24T06:32:58.066Z","avatar_url":"https://github.com/Sweep76.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CppLib(TEMP)\n\n## Introduction\n\nC++ Library\n\n## Platform\n\n* Linux\n\n## Requirement\n\n* g++ 6.3.0\n* cmake 2.8.2\n\n## Run\n\n1. Clone\n\n```bash\n$ git clone https://github.com/zy2625/CppLib.git\n```\n\n2. Build\n\n    * Samples only:\n    ```bash\n    $ mkdir build \u0026\u0026 cd build\n    $ cmake ..\n    $ make\n    ```\n    * Additional tests:\n    ```bash\n    $ mkdir build \u0026\u0026 cd build\n    $ cmake -DCPPLIB_BUILD_TEST=ON ..\n    $ make\n    ```\n\n3. Run\n    * targets:\n      * specific target\n      ```bash\n      $ cd .. \u0026\u0026 ./bin/Stack ./data/tobe.txt\n      ```\n      * custom target\n      ```bash\n      $ make run\n      ```\n    * tests:\n      * detailed output\n      ```bash\n      $ cd .. \u0026\u0026 ./bin/Test\n      ```\n      * test summary\n      ```bash\n      $ make test\n      ```\n\n## Contents\n\n* [Deque](#deque)\n* [Queue](#queue)\n* [Stack](#stack)\n\u003c!-- * [Heap](#heap)\n* [List](#list)\n* [PriorityQueue](#priorityqueue)\n* [Random](#random)\n* [Timer](#timer)\n* [UnionFind](#unionfind)\n* [Vector](#vector) --\u003e\n\n## Details\n\n### Deque\n\n* [Deque](https://github.com/zy2625/CppLib/blob/master/include/Deque.h)\n\n#### Usage\n\n```\n$ more data/tobe.txt\nto be or not to - be - - that - - - is\n\n./bin/Deque data/tobe.txt\nAs queue: to be or not to be (2 left on deque)\nAs stack: to be not that or be (2 left on deque)\n```\n\n\u003c!-- ### Heap\n\n* [BinaryHeap](https://github.com/zy2625/CppLib/blob/master/include/BinaryHeap.h)\n* [IndexHeap](https://github.com/zy2625/CppLib/blob/master/include/IndexHeap.h)\n\n#### Usage\n\n```\n$ more data/tinyHeap.txt\nH E A P - E X A M - P L E -\n\n./bin/Heap data/tinyHeap.txt\nP X P (8 left on heap)\n``` --\u003e\n\n\u003c!-- ### List\n\n* [Vector](https://github.com/zy2625/CppLib/blob/master/include/Vector.h)\n* [List](https://github.com/zy2625/CppLib/blob/master/include/List.h)\n\n#### Usage\n\n```\n./bin/List\n    x.insert_back(): 0 1 2 3 4 5 6 7 8 9 10 11\nx.remove_front(): 0 1 2 3 4 5 6 7 8 9 10 11\n   x.insert_front(): 11 10 9 8 7 6 5 4 3 2 1 0\n x.remove_back(): 0 1 2 3 4 5 6 7 8 9 10 11\n        x.insert(): 0 1 2 3 4 5\n          y = x: 0 1 2 3 4 5\n          x + y: 0 1 2 3 4 5 0 1 2 3 4 5\n         x += y: 0 1 2 3 4 5 0 1 2 3 4 5\n              x: 0 1 2 3 4 5 0 1 2 3 4 5\n              y: 0 1 2 3 4 5\n``` --\u003e\n\n\u003c!-- ### PriorityQueue\n\n* [PriorityQueue](https://github.com/zy2625/CppLib/blob/master/include/PriorityQueue.h)\n\n#### Usage\n\n```\n$ more data/tinyPQ.txt\nH E A P - E X A M - P L E -\n\n./bin/PriorityQueue data/tinyPQ.txt\nQ X P (6 left on priority queue)\n``` --\u003e\n\n### Queue\n\n* [Queue](https://github.com/zy2625/CppLib/blob/master/include/Queue.h)\n\n#### Usage\n\n```\n$ more data/tobe.txt\nto be or not to - be - - that - - - is\n\n./bin/Queue data/tobe.txt\nto be or not to be (2 left on queue)\n```\n\u003c!--\n### Random\n\n* [Random](https://github.com/zy2625/CppLib/blob/master/include/Random.h)\n\n#### Usage\n\n```\n./bin/Random\nShuffle:\n  K♣  A♦  A♠ 10♠  4♦  4♠  7♠  8♦  Q♠  K♦  2♥  6♣  3♥\n  K♥  5♣  3♣  6♥  2♠  Q♣  9♠  Q♥  A♥ 10♥  6♠  6♦  7♣\n  8♥  J♣  J♥  K♠ 10♣ 10♦  5♥  9♥  9♦  7♦  2♦  5♦  4♣\n  Q♦  J♦  4♥  3♦  5♠  A♣  8♣  7♥  8♠  3♠  J♠  2♣  9♣\n\nNormal Distribution:\n*\n***\n******\n********\n***************\n****************************\n*******************************************\n************************************************\n******************************************************************\n*************************************************************\n**********************************************\n********************************\n*********************\n*************\n*******\n*\n``` --\u003e\n\n\u003c!-- ### Search\n\n* [BinarySearchMap](https://github.com/zy2625/CppLib/blob/master/include/BinarySearchMap.h)\n* [BinarySearchSet](https://github.com/zy2625/CppLib/blob/master/include/BinarySearchSet.h)\n* [BinarySearchTreeMap](https://github.com/zy2625/CppLib/blob/master/include/BinarySearchTreeMap.h)\n* [LinearProbingHashMap](https://github.com/zy2625/CppLib/blob/master/include/LinearProbingHashMap.h)\n* [RedBlackTreeMap](https://github.com/zy2625/CppLib/blob/master/include/RedBlackTreeMap.h)\n* [SeparateChainingHashMap](https://github.com/zy2625/CppLib/blob/master/include/SeparateChainingHashMap.h)\n* [SequentialSearchMap](https://github.com/zy2625/CppLib/blob/master/include/SequentialSearchMap.h)\n\n#### Usage\n\n```\n./bin/Search data/ip.csv\nDomain Name: www.google.com\nIP: 216.239.41.99\nDomain Name: amazon.com\nIP: 72.21.203.1\nDomain Name: github.com\nNot Found!\n``` --\u003e\n\n\u003c!-- ### Sort\n\n* [BubbleSort](https://github.com/zy2625/CppLib/blob/master/include/BubbleSort.h)\n* [HeapSort](https://github.com/zy2625/CppLib/blob/master/include/HeapSort.h)\n* [InsertionSort](https://github.com/zy2625/CppLib/blob/master/include/InsertionSort.h)\n* [MergeSort](https://github.com/zy2625/CppLib/blob/master/include/MergeSort.h)\n* [QuickSort](https://github.com/zy2625/CppLib/blob/master/include/QuickSort.h)\n* [Quick3waySort](https://github.com/zy2625/CppLib/blob/master/include/Quick3waySort.h)\n* [SelectionSort](https://github.com/zy2625/CppLib/blob/master/include/SelectionSort.h)\n* [ShellSort](https://github.com/zy2625/CppLib/blob/master/include/ShellSort.h)\n\n#### Usage\n\n```\n./bin/Sort\nRunning time of sorting algorithms in doubling test:\nSORT\\SCALE    10000  20000  40000  80000  160000 320000 640000 ratio\\lg ratio\nHeapSort      0.004  0.007  0.015  0.032  0.086  0.169  0.345  2.076\\1.05\nQuickSort     0.002  0.006  0.012  0.024  0.051  0.123  0.218  1.989\\0.992\nQuick3waySort 0.003  0.007  0.015  0.039  0.066  0.151  0.285  1.993\\0.995\nShellSort     0.003  0.007  0.017  0.042  0.085  0.216  0.444  2.183\\1.13\nMergeSort     0.002  0.006  0.011  0.026  0.053  0.117  0.23   2.041\\1.03\nInsertionSort 0.142  0.564  2.104  8.467  35.204 138.59 561.15 3.959\\1.98\nSelectionSort 0.26   0.996  4.531  15.89  63.395 255.18 1023.2 3.931\\1.97\nBubbleSort    0.534  2.126  8.532  34.823 139.19 560.43 2259.6 3.965\\1.99\n``` --\u003e\n\n### Stack\n\n* [Stack](https://github.com/zy2625/CppLib/blob/master/include/Stack.h)\n\n#### Usage\n\n```\n$ more data/tobe.txt\nto be or not to - be - - that - - - is\n\n./bin/Stack data/tobe.txt\nto be or not to be (2 left on stack)\n```\n\n### Timer\n\n* [Timer](https://github.com/zy2625/CppLib/blob/master/include/Timer.h)\n\n#### Usage\n\n```\n./bin/Timer\nTimestamp: 1499677940528\nTimestamp: 1499677941023\nIt takes 0.495s to sum the sqrt 100000000 times\n```\n\u003c!--\n### UnionFind\n\n* [QuickFind](https://github.com/zy2625/CppLib/blob/master/include/QuickFind.h)\n* [QuickUnion](https://github.com/zy2625/CppLib/blob/master/include/QuickUnion.h)\n* [UnionFind](https://github.com/zy2625/CppLib/blob/master/include/UnionFind.h)\n* [WeightedUnion](https://github.com/zy2625/CppLib/blob/master/include/WeightedUnion.h)\n\n#### Usage\n\n```\n./bin/UnionFind\nRunning time of union-find in doubling test:\nUF\\SCALE      1000   2000   4000   8000   16000  32000  64000  ratio\\lg ratio\nUnionFind     0.001  0.001  0.003  0.01   0.018  0.04   0.057  1.811\\0.857\nWeightedUnion 0.001  0.001  0.004  0.009  0.017  0.044  0.089  2.176\\1.12\nQuickUnion    0.004  0.013  0.076  0.468  1.516  10.8   47.933 5.023\\2.33\nQuickFind     0.004  0.013  0.063  0.22   0.866  3.494  14.106 3.94 \\1.98\n``` --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweep76%2Fcpplib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsweep76%2Fcpplib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsweep76%2Fcpplib/lists"}