Skip to content

JohnCrickett/gosort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Sort

Go solution to Coding Challenges build your own sort.

Testing

Step 0

Set up the testing by running":

curl https://www.gutenberg.org/cache/epub/132/pg132.txt -o test.txt
tr -s '[[:punct:][:space:]]' '\n' < test.txt |sed '/^[0-9]/d' > words.txt

Step 1

% ./gosort words.txt | uniq | head -n5
A
ACTUAL
AGREE
AGREEMENT
AND

Step 2

% ./gosort -u words.txt | head -n5
A
ACTUAL
AGREE
AGREEMENT
AND

Step 3

Quicksort

 % ./gosort --qsort words.txt | uniq | head -n5
A
ACTUAL
AGREE
AGREEMENT
AND

Mergesort

 % ./gosort --mergesort words.txt | uniq | head -n5
A
ACTUAL
AGREE
AGREEMENT
AND

Step 4

 % ./gosort --random-sort words.txt | uniq | head -n5
A
ACTUAL
AGREE
AGREEMENT
AND

About

Go solution to Coding Challenges sort

Topics

Resources

License

Stars

Watchers

Forks

Languages