{"id":17267332,"url":"https://github.com/imcvampire/sort-one-million-number","last_synced_at":"2025-06-30T10:05:47.736Z","repository":{"id":66072025,"uuid":"59356451","full_name":"imcvampire/Sort-one-million-number","owner":"imcvampire","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-11T16:31:09.000Z","size":29135,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:13:54.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imcvampire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-05-21T11:29:40.000Z","updated_at":"2018-08-11T16:31:12.000Z","dependencies_parsed_at":"2023-02-20T19:00:58.595Z","dependency_job_id":null,"html_url":"https://github.com/imcvampire/Sort-one-million-number","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imcvampire/Sort-one-million-number","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcvampire%2FSort-one-million-number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcvampire%2FSort-one-million-number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcvampire%2FSort-one-million-number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcvampire%2FSort-one-million-number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcvampire","download_url":"https://codeload.github.com/imcvampire/Sort-one-million-number/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcvampire%2FSort-one-million-number/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262753165,"owners_count":23358881,"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":[],"created_at":"2024-10-15T08:10:23.126Z","updated_at":"2025-06-30T10:05:47.680Z","avatar_url":"https://github.com/imcvampire.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sort one million number\n------------------------------------\n\n# Problem: \nWrite a program in any programming language of your preference to sort 1\nmillion of signed 32-bit integers using 3 MB of memory.\n\n# Description:\nThis program's job is sort 1 million of signed 32-bit intergers using 3MB of memory. It reads from standard input and write to standard output (input/output format will be described below). \nThis program is compiled by gcc 5.2.1 and is tested in Ubuntu 15.06. It could be compiled by other compiler and run in other OS.\n\n# Input/Output format:\nInput and output contain 1 million lines. Each line contains 1 signed 32-bit intergers number.\n\n# Requirements:\n- GCC 5.2.1 or newer.\n\n# How to build and run:\nTo manually build and run this project, you must have all requirments installed.\n\n1. Run `gcc -o sort sort.c` in this project folder.\n2. Run `./sort` to run this project.\n\n# Why do I choose quicksort:\nEven in the worst case, time complexity of Quicksort is O(n^2) but this case is rarely. In real world, Quicksort usually runs faster than other efficient sorting algorithm (Heapsort and Merge sort). A good reason for this is because it is relatively cache-efficient.\n\nIn worst case, space complexity of Quicksort is O(logn). But when I test this program with some input, it only consumes about 2700 kbytes, very far from limit of 3072 kbytes so it isn't a big problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcvampire%2Fsort-one-million-number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcvampire%2Fsort-one-million-number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcvampire%2Fsort-one-million-number/lists"}