112
qilinmasada, ushbu amallarning o„zlari ham ancha murakkabdir. Garchi yetarlicha
katta n larda ulardan foydalanish tavsiya etilmasada, kichik n larda mazkur usullar
tezroq ishlaydi.
Shu joyni o„zida qat‟iy usullarni ishlash tamoyillariga ko„ra 3 ta toifaga
bo„lish mumkin:
1. To„g„ridan-to„g„ri qo„shish usuli (by insertion);
2. To„g„ridan-to„g„ri tanlash usuli (by selection);
3. To„g„ridan-to„g„ri almashtirish usuli (by exchange).
6.2.
To„g„ridan-to„g„ri qo
„
shish usuli bilan saralash algoritmi