What is bubble sort?

Basic idea: bubble sort, similar to bubble water, the larger number sink, the smaller number slowly float intuitive expression: that is, in the array sort, from small to large sort

Algorithm description

Starting with the first number, each 2 adjacent numbers are compared, with the smaller on the left and the larger on the right. Over and over and over again, n is the length of the array – 1

It’s useless to describe too much, just look at the picture

Code demo

I think this should not need, as long as you know the logic of the algorithm

Resources sort – Bubble sort

The content/inspiration of the article is taken from below

  • Continuous maintenance/update 500+ front end questions/notes github.com/noxussj/Int…

  • [Big data visualization chart plug-in] www.npmjs.com/package/ns-…

  • [3D city modeling using three.js (Zhuhai)] 3D.noxussJ.top /