{"id":25185567,"url":"https://github.com/nawed2611/sorting-and-searching-in-c","last_synced_at":"2026-04-28T00:32:15.482Z","repository":{"id":47088099,"uuid":"406027455","full_name":"nawed2611/Sorting-and-Searching-in-C","owner":"nawed2611","description":"Practising different types of Sorting and Searching Techniques in C language","archived":false,"fork":false,"pushed_at":"2021-11-12T14:43:55.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T03:02:04.308Z","etag":null,"topics":["c","cplusplus","sorting"],"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/nawed2611.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}},"created_at":"2021-09-13T15:27:11.000Z","updated_at":"2021-11-20T07:57:48.000Z","dependencies_parsed_at":"2022-08-29T15:40:30.666Z","dependency_job_id":null,"html_url":"https://github.com/nawed2611/Sorting-and-Searching-in-C","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nawed2611/Sorting-and-Searching-in-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nawed2611%2FSorting-and-Searching-in-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nawed2611%2FSorting-and-Searching-in-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nawed2611%2FSorting-and-Searching-in-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nawed2611%2FSorting-and-Searching-in-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nawed2611","download_url":"https://codeload.github.com/nawed2611/Sorting-and-Searching-in-C/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nawed2611%2FSorting-and-Searching-in-C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","cplusplus","sorting"],"created_at":"2025-02-09T19:39:36.956Z","updated_at":"2026-04-28T00:32:15.466Z","avatar_url":"https://github.com/nawed2611.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Sorting and Searching in C\nPracticing different types of Sorting Techniques in C language. \n\n\u003cp\u003eA must read excerpt from \u003cstrong\u003eCormen's Algorithms\u003c/strong\u003e Book-\u003c/p\u003e\n\u003cp\u003e\"For a concrete example, let us pit a faster computer (computer A) running insertion sort against a slower computer (computer B) running merge sort. They each\nmust sort an array of 10 million numbers. (Although 10 million numbers might seem like a lot, if the numbers are eight-byte integers, then the input occupies\nabout 80 megabytes, which fits in the memory of even an inexpensive laptop computer many times over.) Suppose that computer A executes 10 billion instructions\nper second (faster than any single sequential computer at the time of this writing) and computer B executes only 10 million instructions per second, so that computer A is 1000 times faster than computer B in raw computing power. To make the difference even more dramatic, suppose that the world’s craftiest programmer\ncodes insertion sort in machine language for computer A, and the resulting code requires 2n2 instructions to sort n numbers. Suppose further that just an average\nprogrammer implements merge sort, using a high-level language with an inefficient compiler, with the resulting code taking 50n lg n instructions.\u003c/p\u003e\n  \n`To sort 10 million numbers, computer A takes`\u003cbr\u003e\n`(2.(10)^7)/2 instructions / (10^10 instructions/second) = 20,000 seconds (more than 5.5 hours)`\u003cbr\u003e\u003cbr\u003e\n\n`While computer B takes`\u003cbr\u003e\n`50.(10^7).(lg 10^7) instructions / (107 instructions/second) = 1163 seconds (less than 20 minutes)`\u003cbr\u003e\u003cbr\u003e\n\n\u003cp\u003eBy using an algorithm whose running time grows more slowly, even with a poor\n  compiler, \u003cstrong\u003ecomputer B runs more than 17 times faster than computer A!\u003c/strong\u003e The advantage of merge sort is even more pronounced when we sort 100 million numbers:\nwhere insertion sort takes more than 23 days, merge sort takes under four hours.\nIn general, as the problem size increases, so does the relative advantage of merge\n  sort.\u003c/p\u003e\n\u003cbr\u003e\nHave a look here on how different algorithms work and their time complexities:\n\n[![Visulaize different sorting algorithms](https://img.youtube.com/vi/ZZuD6iUe3Pc/0.jpg)](https://www.youtube.com/watch?v=ZZuD6iUe3Pc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnawed2611%2Fsorting-and-searching-in-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnawed2611%2Fsorting-and-searching-in-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnawed2611%2Fsorting-and-searching-in-c/lists"}