{"id":25483845,"url":"https://github.com/mehmetkahya0/bubble-sorting","last_synced_at":"2025-11-07T07:30:25.995Z","repository":{"id":240979793,"uuid":"803977666","full_name":"mehmetkahya0/bubble-sorting","owner":"mehmetkahya0","description":"This project visualizes the Bubble Sort algorithm using a graphical interface built with Tkinter and Matplotlib. It allows users to input a list of numbers, sort them using Bubble Sort, and see both the original and sorted arrays in a visual format","archived":false,"fork":false,"pushed_at":"2024-08-03T11:50:59.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T12:51:12.707Z","etag":null,"topics":["algiorithimcs","algorithm-competitions","algorithms","bubble","bubble-sort","bubble-sort-algorithm","bubblesort","gui","python","python3","tkinter","tkinter-gui"],"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/mehmetkahya0.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":"2024-05-21T18:11:21.000Z","updated_at":"2024-08-03T11:51:03.000Z","dependencies_parsed_at":"2024-08-03T12:45:56.285Z","dependency_job_id":"4bafdc1c-c738-4caa-95c0-705285280949","html_url":"https://github.com/mehmetkahya0/bubble-sorting","commit_stats":null,"previous_names":["mehmetkahya0/bubble-sorting"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fbubble-sorting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fbubble-sorting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fbubble-sorting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fbubble-sorting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehmetkahya0","download_url":"https://codeload.github.com/mehmetkahya0/bubble-sorting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239521111,"owners_count":19652821,"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":["algiorithimcs","algorithm-competitions","algorithms","bubble","bubble-sort","bubble-sort-algorithm","bubblesort","gui","python","python3","tkinter","tkinter-gui"],"created_at":"2025-02-18T17:48:17.025Z","updated_at":"2025-11-07T07:30:25.045Z","avatar_url":"https://github.com/mehmetkahya0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bubble Sort Visualization\n\nThis project visualizes the Bubble Sort algorithm using a graphical interface built with Tkinter and Matplotlib. It allows users to input a list of numbers, sort them using Bubble Sort, and see both the original and sorted arrays in a visual format.\n\n## Features\n\n- User-friendly graphical interface\n- Input field for entering numbers\n- Displays the original and sorted arrays\n- Shows the number of swaps made during sorting\n- Uses bar charts to visualize the arrays\n\n## Installation\n\nTo run this project, you need to have Python installed on your machine. Additionally, you need to install the following libraries:\n\n- Tkinter\n- Matplotlib\n\nYou can install Matplotlib using pip:\n\n```sh\npip install matplotlib\n```\n\n## Usage\n\nClone the repository and navigate to the project directory:\n\n```sh\ngit clone https://github.com/username/bubble-sorting.git\ncd bubble-sorting\n```\n\nRun the script:\n\n```sh\npython main.py\n```\n\n## Code Overview\n\n### `BubbleSort` Class\n\n- **`__init__`**: Initializes the Tkinter window, sets up the UI components (header, input field, button, result display, and footer).\n- **`sort`**: Implements the Bubble Sort algorithm. Takes a list of integers and returns the sorted list along with the number of swaps made.\n- **`print_result`**: Handles the button click event. Reads the input numbers, sorts them, updates the result label, and plots the original and sorted arrays using Matplotlib.\n- **`run`**: Starts the Tkinter main loop to run the application.\n\n### Main Function\n\nThe main function creates an instance of the `BubbleSort` class and runs the application.\n\n```python\ndef main():\n    bubble_sort = BubbleSort()\n    bubble_sort.run()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Example\n\nAfter running the script, a window will appear where you can enter a list of numbers separated by commas (e.g., `3,1,4,1,5,9,2,6,5,3,5`). Clicking the \"Sort\" button will display the original and sorted arrays along with the number of swaps made. The arrays are visualized using bar charts.\n\n## Author\n\nMehmet Kahya @mehmetkahya0\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetkahya0%2Fbubble-sorting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehmetkahya0%2Fbubble-sorting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetkahya0%2Fbubble-sorting/lists"}