euclid1990 / js-challenges Goto Github PK
View Code? Open in Web Editor NEWImplementation of algorithm and data structure in Javascript Programming Language
Implementation of algorithm and data structure in Javascript Programming Language
Counting sort
algorithm in /sorting/bucket-sort.js
/tests/sorting/bucket-sort.spec.js
Thank you
Counting sort
algorithm in /sorting/counting-sort.js
/tests/sorting/counting-sort.spec.js
Thank you
Just a head up.
in test /tests/sorting/radix-sort.spec.js
If you use this construction:
let array = Array(1000000).map(() => {
return parseInt((Math.random() * 1000000000), 10);
});
Like in test
it('should work with large arrays', function() {
this.timeout(3000);
let array = Array(1000000).map(() => {
return parseInt((Math.random() * 1000000000), 10);
});
expect(sort(array)).to.be.sorted();
});
This returns an empty array of length 1000000 but not initialised. Therefore, it try to sort an empty array instead of an array of random integer values.
Shell sort
algorithm in /sorting/shell-sort.js
/tests/sorting/shell-sort.spec.js
Thank you
Selection sort
algorithm in /sorting/selection-sort.js
/tests/sorting/selection-sort.spec.js
Thank you
Gnome sort
algorithm in /sorting/gnome-sort.js
/tests/sorting/gnome-sort.spec.js
Thank you
Insertion sort
algorithm in /sorting/insertion-sort.js
/tests/sorting/insertion-sort.spec.js
Thank you
Heap sort
algorithm in /sorting/heap-sort.js
/tests/sorting/heap-sort.spec.js
Thank you
Radix sort
algorithm in /sorting/radix-sort.js
/tests/sorting/radix-sort.spec.js
Thank you
Comb sort
algorithm in /sorting/comb-sort.js
/tests/sorting/comb-sort.spec.js
Thank you
Quick sort
algorithm in /sorting/quick-sort.js
/tests/sorting/quick-sort.spec.js
Thank you
Quick sort
algorithm in /sorting/quick-sort.js
/tests/sorting/quick-sort.spec.js
Thank you
Merge sort
algorithm in /sorting/merge-sort.js
/tests/sorting/merge-sort.spec.js
Thank you
Selection sort
algorithm in /sorting/selection-sort.js
/tests/sorting/selection-sort.spec.js
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.