0 Views
0 Downloads
0 Favorites
Introsort
//+------------------------------------------------------------------+
//|                                                    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

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---