Firetron’s MergeSort

0 728 Views No Comments 4 years ago
  • Sorts a table using the merge sorting algorithm.

    Custom Command Dependencies:
    None

    Test Code:

    if not Load('done', false) then
    
      local table = {8, 3, 45, 23, 7, 2}
    
      Log(table)
      Log('Unsorted Table:')
    
      table = CC_MergeSort(table)
    
      Log(table)
      Log('Sorted Table:')
    
      Save('done', true)
    
    end
    HaasScript Code
    Sign in or Register to download for free
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free