localityofreference Questions

2

Solved

Does partition function gives quick sort its locality of reference ? If it does, how ? I mean what is there in quicksort which gives it locality of reference when compared to other algorithms suc...
Dominy asked 16/6, 2015 at 12:6

1

Solved

Say we have an unsorted array and linked list. The worst case when searching for an element for both data structures would be O( n ), but my question is: Would the array still be way faster becaus...

4

Solved

for(int i = 0; i<100; i++) for(int j = 0; j<100; j++) array[j][i] = 0; // array[i][j] = 0; My professor said it was much more costly to initialize a two dimensional array in the first ...
1

© 2022 - 2024 — McMap. All rights reserved.