Download presentation
Presentation is loading. Please wait.
Published byIrwan Lesmono Modified over 5 years ago
1
2 code samples int [] array; int i, j, temp; for(i = 0; i < array.length/2; i++) { j = array.length-1-i; temp = array[i]; array[i] = array[j]; array[j] = temp; } int [] array; int i, j, temp; for(i = 0; i < array.length/2; i*=2) { j = array.length-1-i; temp = array[i]; array[i] = array[j]; array[j] = temp; } Running time Asymptotic Analysis: O( ) notation Systems: Summation of (number of operations) * (cost per operation) Ex: load, add, subtract, store Memory Asymptotic Analysis: O( ) notation, how many primitives are stored Systems: Number of bits for all variables declared
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.