learn-co-curriculum / insertion-sort Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Hi, I think the title to this lesson should be "Selection Sort" instead of "Insertion Sort" - the algorithm described is actually selection sort, not insertion sort, which is significant because the runtime will not be O(n) for an already sorted array using the described method. Also, the code examples in the lesson name the function selection sort. Thanks!
While working through the Insertion-Sort readme lesson, I found that there is a typo in the first code block as well as a formatting issue with the picture and the text.
I'm guessing the array just needs a comma after the 6.
What is there Now:
let unsortedArray = [5, 6 -1, 1, 3]
Fixed missing comma:
let unsortedArray = [5, 6, -1, 1, 3]
Hi. Small thing -- a few times in the sample code throughout the lesson, currentElement
is declared but not used. Just wanted to avoid confusion for future readers. Thanks!
I think this may be incorrectly named.
Throughout the lesson the unsortedArray needs to be corrected to add a comma between the 6 and -1 to ensure proper differentiation between elements. It should look as follows:
let unsortedArray = [5, 6, -1, 1, 3]
The cover image, which depicts a card game, does show insertion sort, but all subsequent code-along is selection sort.
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.