RootSort

    

This is a demonstration of my root sorting algorithm that I made up while taking Masters classes and CSULB.
I originally wrote it in C++ as a console function and analyzed its speed as well as changing its height and width
and optimization. It was found to be optimal when using a height and with that was as close to equal as possible
so changing the height made it move less elements downward and changing its width made each row have to do a
bigger bubble sort.This algorithm is shown to be measured at O(N*ROOT(N)) time which is far better than a bubble
sort but not as fast as a tree-sort.

I later wrote my algorithm in C# demonstrating it in a Winform GUI. It has a few advantages in that it can be
implemented with very little code and does not have to use any of the stack. The idea of root sorting is to have a
basic bubble sort do more work to elements by making an array look like a square and attempting to push each
element down a row before swapping them with the adjacent element.

This version is implemented using pure Javascript.

Thanks to Ronald Lopez for helping get the highlighting part done.

251 476 221 257 83 392 36 157 403 402
363 374 452 238 229 7 227 147 369 443
53 398 365 374 287 360 321 334 330 224
33 64 14 210 111 41 67 401 456 358
88 71 209 251 302 258 308 112 383 469
48 19 463 262 191 352 111 346 469 223
71 202 327 178 369 298 360 242 127 187
439 326 190 11 354 481 189 114 72 29
51 208 450 360 176 13 101 251 19 258
430 220 431 233 286 386 243 30 381 3


refresh rate:


max value:
Note: this is the maximum number that the random number generator can generate. Valid range is (1-10000).