{"id":22222497,"url":"https://github.com/kacper0199/sorting-algorithms-visualizer","last_synced_at":"2025-03-25T08:12:41.189Z","repository":{"id":52309156,"uuid":"520654497","full_name":"Kacper0199/Sorting-Algorithms-Visualizer","owner":"Kacper0199","description":"The purpose of this project is to visualize some fundamental sorting algorithms using simple functions and python module pygame.","archived":false,"fork":false,"pushed_at":"2022-08-03T18:45:39.000Z","size":55442,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T07:22:25.134Z","etag":null,"topics":["data-structures","pygame","python","sorting-algorithms","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Kacper0199.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T21:28:15.000Z","updated_at":"2022-09-04T19:04:13.000Z","dependencies_parsed_at":"2022-08-27T03:08:48.876Z","dependency_job_id":null,"html_url":"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer","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/Kacper0199%2FSorting-Algorithms-Visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kacper0199%2FSorting-Algorithms-Visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kacper0199%2FSorting-Algorithms-Visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kacper0199%2FSorting-Algorithms-Visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kacper0199","download_url":"https://codeload.github.com/Kacper0199/Sorting-Algorithms-Visualizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423193,"owners_count":20612748,"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","pygame","python","sorting-algorithms","visualization"],"created_at":"2024-12-02T23:18:29.370Z","updated_at":"2025-03-25T08:12:41.166Z","avatar_url":"https://github.com/Kacper0199.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/banner.png\" width=\"700\" height=\"200\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eSorting-Algorithms-Visualizer\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"\"\u003e![Repo Size](https://img.shields.io/github/repo-size/Kacper0199/Sorting-Algorithms-Visualizer?color=green)\u003c/a\u003e\n  \u003ca href=\"\"\u003e![Repo Elements](https://img.shields.io/github/directory-file-count/Kacper0199/Sorting-Algorithms-Visualizer?color=orange)\u003c/a\u003e\n  \u003ca href=\"\"\u003e![Version](https://img.shields.io/pypi/pyversions/pygame)\u003c/a\u003e\n  \u003ca href=\"\"\u003e![Last Commit](https://img.shields.io/github/last-commit/Kacper0199/Sorting-Algorithms-Visualizer?color=purple)\u003c/a\u003e\n  \u003ca href=\"\"\u003e![Repo Language](https://img.shields.io/github/languages/top/Kacper0199/Sorting-Algorithms-Visualizer?color=ff69b4)\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\nThe purpose of this project is to visualize some fundamental sorting algorithms using simple functions and python module pygame.\n\n---\n\n- [1. Algorithms Preview](#1-algorithms-preview)\n- [2. Installation](#2-installation)\n- [3. Get Started](#3-get-started)\n- [4. Contributing](#4-contributing)\n\n## 1. Algorithms Preview\n\n|Visualization|Algorithm|Best Time Complexity|Avg Time Complexity|Worst Time Complexity| \n|:------------------------------------------------------------------------------------------------------------------------------------------------------:|:---:|:---:|:---:|:---:|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/selection_sort.gif\"\u003e       |  Selection sort  |$$n^{2}$$|$$n^{2}$$|$$n^{2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/insertion_sort.gif\"\u003e       |  Insertion sort   |$$n$$|$$n^{2}$$|$$n^{2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/bubble_sort.gif\"\u003e     |  Bubble sort   |$$n$$|$$n^{2}$$|$$n^{2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/cocktail_sort.gif\"\u003e    |  Cocktail sort  |$$n$$|$$n^{2}$$|$$n^{2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/shell_sort.gif\"\u003e           |   Shell sort   |$$nlogn$$|$$n^{4/3}$$|$$n^{3/2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/quick_sort.gif\"\u003e  |   Quick sort    |$$nlogn$$|$$nlogn$$|$$n^{2}$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/merge_sort.gif\"\u003e          |   Merge sort   |$$nlogn$$|$$nlogn$$|$$nlogn$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/heap_sort.gif\"\u003e         |   Heap sort    |$$nlogn$$|$$nlogn$$|$$nlogn$$|\n| \u003cimg width=\"400\" height=\"250\" alt=\"\" src=\"https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/pictures/radix_sort.gif\"\u003e  |   Radix sort   |$$n$$|$$n\\frac{k}{d}$$|$$n\\frac{k}{d}$$|\n\n## 2. Installation\n\nCopy the repository by forking and then downloading it using:\n\n```bash\ngit clone https://github.com/\u003cYOUR-USERNAME\u003e/Sorting-Algorithms-Visualizer\n```\n\nInstall requirements use:\n\n```bash\ncd Sorting-Algorithms-Visualizer\npip install -r requirements.txt\n```\n\nRun App:\n\n```bash\ncd Sorting-Algorithms-Visualizer\npython3 main.py\n```\n\n## 3. Get Started\n\nRunning **_main.py_** you can sort array (in ascending order) represented by bars.\n\n- Change number of elements in array by pressing left/right arrow keys:\n\n       →  (increase size of array - up to 300 elements)\n       \n       ←  (decrease size of array - up to 10 elements)\n\n- Select sorting algorithm by pressing:\n\n     \u003ckbd\u003e1\u003c/kbd\u003e : Selection sort\n     \n     \u003ckbd\u003e2\u003c/kbd\u003e : Insertion sort\n     \n     \u003ckbd\u003e3\u003c/kbd\u003e : Bubble sort\n     \n     \u003ckbd\u003e4\u003c/kbd\u003e : Cocktail sort\n     \n     \u003ckbd\u003e5\u003c/kbd\u003e : Shell sort\n     \n     \u003ckbd\u003e6\u003c/kbd\u003e : Quick sort\n     \n     \u003ckbd\u003e7\u003c/kbd\u003e : Merge sort\n     \n     \u003ckbd\u003e8\u003c/kbd\u003e : Heap sort\n     \n     \u003ckbd\u003e9\u003c/kbd\u003e : Radix sort\n\n- Press \u003ckbd\u003eEnter\u003c/kbd\u003e to start sorting\n\n- To shuffle and create new array hit \u003ckbd\u003eSpace\u003c/kbd\u003e\n\n## 4. Contributing\n\nFeel free to contribute if you want to implement other sorting algorithms in **_algorithms.py_** or create better visualizer. **Please be sure to checkout [CONTRIBUTING](https://github.com/Kacper0199/Sorting-Algorithms-Visualizer/blob/main/CONTRIBUTING.md) if you want to help develop this project!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkacper0199%2Fsorting-algorithms-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkacper0199%2Fsorting-algorithms-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkacper0199%2Fsorting-algorithms-visualizer/lists"}