sarthakjoleya's blog

By sarthakjoleya, history, 8 months ago, In English

Hi Codeforces Community, I am currently developing a Sorting Visualizer using Svelte for Frontend Github Repo and I'm not able to generate logic for merge and quick sort. The strategy I'm using for showing visualizations is that I sort the randomly generated list using the algorithm specified and then generate the swaps array, which stores which index was swapped with which index. You can find the implementation for selection, insertion, and bubble sort in the src/algos folder.
Can anyone please help me complete this project? I understand that the approach I followed till now might not be correct, and I'm open to any constructive criticism and fixes from this awesome community. Thanks :)

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

By now you probably realize many sorting algorithm doesnt produce swaps. So why do you still represent sorting with a list of swaps?

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It was easier to get started with it, but now I have hit a roadblock. How should I implement it now?