#include "Insert.h" Insert::Insert(int n, int* x) : Sort(n, x) { this->algName = "Insert Sort"; } Insert::Insert() { this->algName = "Insert Sort"; } void Insert::Run(void) { int t; int i, j; for (i = 1; i < n; i++) { t = x[i]; for (j = i; j > 0 && x[j-1] > t; j--) { x[j] = x[j-1]; this->CountSwap(); } x[j] = t; } } Insert::~Insert(void) { }