//+------------------------------------------------------------------+
//| Introsort.mq5 |
//| 2019-2021, dimitri pecheritsa |
//| mql5.com/en/users/dmipec |
//|------------------------------------------------------------------|
//| scr| introsort example |
//+------------------------------------------------------------------+
#include <Mqh\Algorithms\SortIntro\Introsort.mqh>
#include <Mqh\Algorithms\SortIntro\Functions.mqh>
void OnStart()
{
int a[] = {3, 1, 23, -9, 233, 23, -313, 32, -9};
ArraySort(a,new CIntroSort<int,int>,SORT_ORDER_ACCENDING);
ArrayPrint(a);
}
//+------------------------------------------------------------------+
//| >>>| -313 -9 -9 1 3 23 23 32 233 |
//+------------------------------------------------------------------+
Comments