Today in the following public number to see the visualization of the algorithm, suddenly interest comes, recorded, originally this is the right way to open the front end, as a rookie I finally found the front end of the High point!!

Mp.weixin.qq.com/s/p8vShmX21…

There is no code below, only the effect diagram, interested can study yourself!!

Life is too short to do something that no one wants

Original image:

Final picture:

Train of thought

  • 1, Mr. OneDisorderly ordinal group
  • 2. Use canvas to draw thisDisorderly ordinal groupFor all the elementsThe polar point
  • 3,Disorderly ordinal groupforThe sorting
  • 4. Sorting processKeep emptying the canvasAnd,redrawThe points corresponding to the polar coordinates of all the elements of the array
  • 5, until the sorting is completed, terminate the canvas operation let’s follow this step, step by step to achieve the effect, brothers, rush ah!!

Bubble sort


Correct renderings:

Selection sort


Correct renderings:

Insertion sort


Correct renderings:

Heap sort


Correct renderings:

Quick sort


Correct renderings:

Radix sort


Correct renderings:

Hill sorting


Correct renderings: