Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A web app to visualize sorting algorithms by adjusting speeds and sample sizes.

License

NotificationsYou must be signed in to change notification settings

KyleSmith0905/Sorting-Algorithm

Repository files navigation

View sorting algorithmshere.

How to View

Simply prepare your favorite modern browser.

  1. Navigate tohttps://sorting-algorithm-jet.vercel.app/.

  2. To select a specific sorting algorithm:

    a. Press the button on the top of the page after the "Sorting with" text.

    b. Press on any of the buttons displayed.

  3. To customize graph, sound, samples, or sorting:

    a. Look either below the graph or to the right. Click on the menu, for example:Sound Settings.

    b. Look over the slider menu that appeared below the menu containing button you clicked.

    c. To change an option, slide the square along the slider.

Contributing

If you wanted to add additional algorithms, such as sorting algorithms. Navigate tosrc/settings/{Setting Name} and create a.ts file. To help with when creating algorithms, please take these advice.

Settings NameAdvice
Sorting Algorithm
  • Variables that persist after every iteration is stored in thedata parameter asany.
  • Sorting algorithms are supposed to only perform a few actions to the array everytime it's called.
  • With recusive algorithms (likeStooge Sort) you could unravel algorithms into a "nests" array. Replace each recursive call by pushing to the "nests" array instead. Refer toStoogeSort.ts for better understanding.
  • With Iterative algorithms (likeGnome Sort) replace allfor(a; b; c) {d} with:a; if (b) { d }; c. Refer toGnomeSort.ts for better understanding.
  • Push indexes of coordinates changing or comparing todata.highlight. Define the most important coordinate todata.actionPoint
  • Graph Color
  • Highlight color is the color of the "sweeper".
  • Graph Type
  • Variables that persist after every iteration is stored in thegraphData parameter asany.
  • This is the slowest operation due to canvas. Minimize the number of times stroke or filled.
  • Sample Type
  • The order of the output does not matter.
  • .
    Sample Order
  • The coordinates will be sorted when received.
  • .
    Sound Type
  • Stopping the oscillator results in aclicking sounds that does not sound good every 4 millisecond. Instead, modify the oscillator in the parameter.
  • It's better to contribute something small/broken than to contribute nothing.

    About

    A web app to visualize sorting algorithms by adjusting speeds and sample sizes.

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp