Why is the time complexity in gnome so high?

But the time complexity is O (N^2). This is because the variable – ‘index’ in our program doesn’t always gets incremented, it gets decremented too. However this sorting algorithm is adaptive and performs better if the array is already/partially sorted.
For More Information Please Refer:


You May Also Like to Read: