Several common algorithms in C

xiaoxiao2021-03-06  86

#include #include

INT FIND (int Array [], int 4 / * General lookup method * / {INT i; if (size <= 0) return -1; for (i = 0; i = End) Return; for (i = begin 1; i <= end; i) IF (array [begin]> array [i]) swap (& array [begin], & array [i]); M_Sort (Array, Begin, End);} void Q_SORT (int Array [], int start (INT) / * Rapid Sort Law * / {INT I, Last; if (Begin> = End) Return; SWAP & array [begin], & array [(begin end) / 2]); Last = Begin; for (i = begin 1; i <= end; i) IF (array [i] Array [MID]) begin = MID 1; Else IF (Date

转载请注明原文地址:https://www.9cbs.com/read-106571.html

New Post(0)