Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 581 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 581 Bytes

patika.dev_homework

Patika.dev kodluyoruz için verilen ödevleri içerir.

Insertion Short Project

Insertion Sort 1. [22,27,16,2,18,6] -> n [2,27,16,22,18,6] -> n-1 [2,6,16,22,18,27] -> n-2 [2,6,16,22,18,27] -> n-3 [2,6,16,18,22,27] -> n-4 [2,6,16,18,22,27] -> 1

(n^2) is dominant factor.

Time Complexity = (O(n^2)) 3. soru Average case

[7,3,5,8,2,9,4,15,6] dizisinin Insertion Sort'a göre ilk 4 adımını yazınız.

[7,3,5,8,2,9,4,15,6] -> n [2,3,5,8,7,9,4,15,6] -> n-1 [2,3,5,8,7,9,4,15,6] -> n-2 [2,3,4,8,7,9,5,15,6] -> n-3 [2,3,4,5,7,9,8,15,6] -> n-4