{"id":30288389,"url":"https://github.com/n4vrl0s3/bubble-sort-and-insert-sort","last_synced_at":"2025-08-16T22:33:52.602Z","repository":{"id":269891177,"uuid":"908770239","full_name":"n4vrl0s3/Bubble-Sort-and-Insert-Sort","owner":"n4vrl0s3","description":"This repository contains Python implementations of two classic sorting algorithms: Bubble Sort and Insertion Sort. It serves as a simple and educational resource for understanding the basics of sorting algorithms, their implementations, and their performance characteristics. Ideal for students, developers, and anyone.","archived":false,"fork":false,"pushed_at":"2025-04-29T03:50:36.000Z","size":41,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T01:33:50.871Z","etag":null,"topics":["bubble-sort","cpp","insertion-sort","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/n4vrl0s3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["n4vrl0s3"],"patreon":null,"open_collective":null,"ko_fi":"yanshaaa","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-12-26T23:30:34.000Z","updated_at":"2025-04-29T04:09:06.000Z","dependencies_parsed_at":"2025-02-27T03:32:57.511Z","dependency_job_id":"1948f7aa-b106-433e-afcf-2dcc827c11ce","html_url":"https://github.com/n4vrl0s3/Bubble-Sort-and-Insert-Sort","commit_stats":null,"previous_names":["guanshiyin28/bubble-sort-dan-insert-sort","n4vrl0s3/bubble-sort-and-insert-sort","guanshiyin28/bubble-sort-and-insert-sort"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/n4vrl0s3/Bubble-Sort-and-Insert-Sort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n4vrl0s3%2FBubble-Sort-and-Insert-Sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n4vrl0s3%2FBubble-Sort-and-Insert-Sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n4vrl0s3%2FBubble-Sort-and-Insert-Sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n4vrl0s3%2FBubble-Sort-and-Insert-Sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n4vrl0s3","download_url":"https://codeload.github.com/n4vrl0s3/Bubble-Sort-and-Insert-Sort/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n4vrl0s3%2FBubble-Sort-and-Insert-Sort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781200,"owners_count":24643805,"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-16T02:00:11.002Z","response_time":91,"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":["bubble-sort","cpp","insertion-sort","python"],"created_at":"2025-08-16T22:33:51.448Z","updated_at":"2025-08-16T22:33:52.583Z","avatar_url":"https://github.com/n4vrl0s3.png","language":"Python","funding_links":["https://github.com/sponsors/n4vrl0s3","https://ko-fi.com/yanshaaa"],"categories":[],"sub_categories":[],"readme":"# Bubble Sort and Insert Sort\n\nThis repository aims to provide a comprehensive starting point for understanding and implementing two fundamental sorting algorithms: Bubble Sort and Insertion Sort. These algorithms are implemented in Python and serve as a great introduction to sorting techniques for beginners and intermediate programmers.\n\n\u003chr\u003e\u003cbr\u003e\n\n## Purpose of This Repository\n\n### Bubble Sort\n\nBubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The process is repeated until the list is sorted. Although it is not the most efficient sorting algorithm for large datasets, it is easy to understand and implement.\n\n### Insertion Sort\n\nInsertion Sort is another simple sorting algorithm that builds the final sorted array one item at a time. It is much more efficient than Bubble Sort for small or nearly sorted datasets. It works by taking elements from the unsorted part of the array and inserting them into their correct position in the sorted part.\n\n\u003chr\u003e\u003cbr\u003e\n\n## Demonstration\n\nHere is a quick demo of the sorting algorithms in action:\n\n### Bubble Sort Example\n\n```python\ndef bubble_sort(arr):\n    n = len(arr)\n    for i in range(n):\n        for j in range(0, n-i-1):\n            if arr[j] \u003e arr[j+1]:\n                arr[j], arr[j+1] = arr[j+1], arr[j]\n    return arr\n\n# Example usage\narr = [64, 34, 25, 12, 22, 11, 90]\nsorted_arr = bubble_sort(arr)\nprint(\"Sorted array is:\", sorted_arr)\n```\n\n### Insertion Sort Example\n\n```python\ndef insertion_sort(arr):\n    for i in range(1, len(arr)):\n        key = arr[i]\n        j = i-1\n        while j \u003e= 0 and key \u003c arr[j]:\n            arr[j + 1] = arr[j]\n            j -= 1\n        arr[j + 1] = key\n    return arr\n\n# Example usage\narr = [12, 11, 13, 5, 6]\nsorted_arr = insertion_sort(arr)\nprint(\"Sorted array is:\", sorted_arr)\n```\n\n\u003chr\u003e\u003cbr\u003e\n\n## Features\n\n- Easy-to-understand implementations of Bubble Sort and Insertion Sort\n- Well-commented code for better understanding\n- Suitable for beginners and intermediate programmers\n\n\u003chr\u003e\u003cbr\u003e\n\n## Technologies Used\n\n- Python\n\n\u003chr\u003e\u003cbr\u003e\n\n## Project Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/n4vrl0s3/Bubble-Sort-and-Insert-Sort.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd Bubble-Sort-and-Insert-Sort\n   ```\n\n\u003chr\u003e\u003cbr\u003e\n\n## Steps to Run\n\n1. Ensure you have Python installed on your system.\n2. Run the Python scripts:\n   ```bash\n   python program.py\n   ```\n\n\u003chr\u003e\u003cbr\u003e\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n\u003chr\u003e\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.x.com/n4vrl0s3/\"\u003e\n    \u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026height=200\u0026color=100:49108B,20:F3F8FF\u0026section=footer\u0026reversal=false\u0026textBg=false\u0026fontAlignY=50\u0026descAlign=48\u0026descAlignY=59\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn4vrl0s3%2Fbubble-sort-and-insert-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn4vrl0s3%2Fbubble-sort-and-insert-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn4vrl0s3%2Fbubble-sort-and-insert-sort/lists"}