Author Topic: Sorting with animation  (Read 2275 times)

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #15 on: January 18, 2023, 12:49:21 AM »

HSE

  • Member
  • *****
  • Posts: 2491
  • AMD 7-32 / i3 10-64
Re: Sorting with animation
« Reply #16 on: January 18, 2023, 01:27:19 AM »
Fantastic  :thumbsup:
Equations in Assembly: SmplMath

jj2007

  • Member
  • *****
  • Posts: 13932
  • Assembly is fun ;-)
    • MasmBasic
Re: Sorting with animation
« Reply #17 on: January 18, 2023, 01:32:36 AM »
Fifth part

Hi Mikl,

Sounds good but I can't see an animation, and the "translated" zip archive isn't found... :sad:

Quote
A multiple run through the array is performed, neighboring elements are compared and, if necessary, swapped. When the end of the array is reached, the direction is reversed. While moving to the beginning of the array, we find the maximum element and change it with the element that is at the end of the array. This pushes the minimum element to the beginning of the array. While moving to the end of the array, we find the minimum element and change it with the element that is at the beginning of the array. In this case, the maximum element is pushed to the end of the array. Thus, simultaneously during one pass, the maximum and minimum elements of the end and beginning of the array are filled.

https://en.wikipedia.org/wiki/Cocktail_shaker_sort

HSE

  • Member
  • *****
  • Posts: 2491
  • AMD 7-32 / i3 10-64
Re: Sorting with animation
« Reply #18 on: January 18, 2023, 01:46:28 AM »
Equations in Assembly: SmplMath

zedd151

  • Member
  • *****
  • Posts: 1942
Re: Cocktail shaker sort
« Reply #19 on: January 18, 2023, 01:56:21 AM »
lol. I had never heard of that sorting algorithm before (cocktail shaker sort). But I once made a sorting algorithm that I called a bidirectional sort which worked very similarly (reversing direction, etc)  if not very slowly.  :biggrin: 
Nice graphic of its implementation. Thankfully I had stopped experimenting with home brew sorting algos in favor of tried and trued methods, which of course are always much faster than anything I could dream up. It was fun though.
Regards, zedd.
:tongue:

jj2007

  • Member
  • *****
  • Posts: 13932
  • Assembly is fun ;-)
    • MasmBasic
Re: Sorting with animation
« Reply #20 on: January 18, 2023, 02:01:13 AM »
Hi JJ!

Just now I realise how was that:

https://wasm.in/threads/sortirovki-s-animaciej.34674/page-5

Thanks, Hector, works like a charm :thumbsup:

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #21 on: January 18, 2023, 02:26:27 AM »
Quote
Sounds good but I can't see an animation, and the "translated" zip archive isn't found...
Hi jj2007!
This is especially for you!

jj2007

  • Member
  • *****
  • Posts: 13932
  • Assembly is fun ;-)
    • MasmBasic
Re: Sorting with animation
« Reply #22 on: January 18, 2023, 01:14:34 PM »
Thanks, Mikl :thumbsup:

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #23 on: January 26, 2023, 10:01:21 AM »

jj2007

  • Member
  • *****
  • Posts: 13932
  • Assembly is fun ;-)
    • MasmBasic
Re: Sorting with animation
« Reply #24 on: January 26, 2023, 10:03:52 AM »
Very nice animation, Mikl :thumbsup:

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #25 on: January 26, 2023, 10:06:38 AM »

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #26 on: January 26, 2023, 10:08:15 AM »

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #27 on: January 26, 2023, 10:10:05 AM »

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #28 on: January 26, 2023, 10:12:17 AM »

Mikl__

  • Member
  • *****
  • Posts: 1345
Re: Sorting with animation
« Reply #29 on: January 26, 2023, 10:13:57 AM »