Skip to content

Files

Latest commit

634fe05 · Oct 15, 2023

History

History

file_sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 31, 2020
Feb 5, 2017
May 29, 2022
May 29, 2022
Oct 15, 2023
Feb 5, 2017

Test (sort numbers in a big file)

bit.cpp

this file use std::bitset to handle this problem, and it's efficient is small scale numbers(e.g, no more than 1M numbers).

bs.cpp

this file works like divide-conquer, it split a big file into many small files, and then sort each file individually, then travel through all these small files read one number each file and find the smallset one(or biggest one) and then write it to a new file(all numbers in this file will be sorted).

rand.cpp

this file will generate random numbers and write them to a file(some numbers in this file are duplicate).