Ndeipi nzira yokusarudza nayo inogona kuitwa munguva inopfuura n2? Tichifunga nezvemubvunzo wapfuura, nyora mashoko akapoteredza mhinduro yacho. Inogona kuva mitsara 1 - 20. Mashoko akapoteredza:
Somuenzaniso, funga nezve deterministic sorting algorithm quicksort. Ikoku kunogadzirisa chinetso chokuronga ndaza yenhamba dzakakwana dzinopiwa sechinhu chinopinda. Muchiitiko chakaipisisa ndipo panogadziriswa kana kurongwa zvakapesana, uye algorithm inotora nguva O ((n2) yechiitiko ichi. Kana tikafungidzira kuti zvose zvinobvira permutations of the input list are equally likely, the average time taken for sorting is O ((n log n). Nyaya yakanakisisa inoitika apo pivoting imwe neimwe inoparadzanisa rondedzero nepakati, inodawo O ((n log n) nguva.