Guest User

Untitled

a guest
Jun 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //Esercizio numero 2:
  2.  
  3. void algo2 (int S[], int n){
  4. int A[n/2], B[n/2];
  5. mergeSort(S, 0, n-1);
  6. for(i=0; i<=n/2; i++)
  7. A[i]=S[i];
  8. for(j=n/2+1; j<n; j++)
  9. B[j]=S[j];
  10. }
  11.  
  12. //Tempo di esecuzione: O(nlogn) +Ø(n)
  13. //Sicuramente migliorabile, intanto scrivete questo casomai non si arriva ad un algoritmo migliore
Add Comment
Please, Sign In to add comment