+ 1
In insertion sort which is faster array implemantation or linked list implementation
3 ответов
+ 12
Actually Both are Same
As linked list is a same as a array it will act same as a array does in any kind of Sorting system.
+ 2
OK thanks
+ 1
actually both are not same. it depends upon in which way you are implementing it. if you are inserting all the elements in one go and then sort it. it is kind of same for both, if you are sorting whenever a new element is inserted it will be "much" faster in linked list. also if you want to make array implementation more faster instead of checking for array index ever time in loop you can simply just check for array out of bounds exception. its just a fun thing i discovered few days ago.