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]

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

Cosc 2150 Arrays in assembly code. Variables and addresses Uncompiled ld [a], %r1 addcc %r1, 2, %r3 ARC has three addressing modes —immediate, direct,
Axiomatic semantics - II We reviewed the axiomatic semantic rules for: –assignment –sequence –conditional –while loop We also mentioned: –preconditions,
Searching and Sorting, Template Functions, and Vectors ITK 169 Fall 2003.
***** SWTJC STEM ***** Chapter 7 cg 50 Arrays as Parameters Regular variables are passed to a method by value; i.e., the variable value is copied to a.
1 BUILDING JAVA PROGRAMS CHAPTER 7.2 ARRAY TRAVERSAL ALGORITHMS.
Week 12 - Wednesday.  What did we talk about last time?  Hunters and prey.
POINTERS IN C. Introduction  A pointer is a variable that holds a memory address  This address is the location of another object (typically another.
SPACE COMPLEXITY & TIME COMPLEXITY 1. ALGORITHMS COMPLEXITY 2.
HF NOISE FILTERS PERFORMANCE
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
Fuel cell development program for electric vehicle
Ch48 Statistics by Chtan FYHSKulai
Factor Based Index of Systemic Stress (FISS)
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Solar Astronomy with LOFAR - First Steps
Chp9: ODE’s Numerical Solns
Gil Kalai Einstein Institute of Mathematics
On-Shell Methods in Quantum Field Theory
Use z-score as a standardized value for comparisons
Assessing Listening Ningtyas Orilina A, M.Pd.
Summary.
Department of Informatics
Fluid Dynamics for Brewing
Knowledge Sharing: GSP Pump Energy Assessment
The variable gamma-ray sky
The LHCb Calorimeter System: Design, Performance and Upgrade
Jobs and Unemployment Goals for this chapter
Macroeconomics: Economic Growth Master HDFS
Definition of Integral
Biomechanics of Vertical Jump
Physics 3 – Sept 27, 2016 Do Now: P3 Challenge –
Naval Center for Cost Analysis (NCCA) Jake Mender and Ann Hawpe
Availability Operating systems I800
Time Synchronization and Logical Clocks
Chi Square Test X2.
Crop Insurance Ratings: Evolution and Mutations
Introduction to Demand Side Management Programs
TEACHING STATISTICS Using the EL-W535HT.
Section 7.5 Proving Triangle Proportions
Math 10 online work that was due today at the start of class:
Chapter 1 Managers, Profits, and Markets
Section 5.1 Review and Preview.
Quantitative Economics
Section Focus of a Parabola
Systematic Managed Floating Jeffrey Frankel Harpel Professor of Capital Formation and Growth Harvard Kennedy School, Harvard University 4th Asian Monetary.
Lecture 1: Deep Neural Networks and Backpropagation Training
Teaching a Data-Driven Approach to Inference
WPI Mathematics Institute for Secondary Teaching (MIST) 2017
Feng Duan, Yu Lei, Linbin Yu, Raghu N. Kacker, D. Richard Kuhn
C4 Chapter 6: Integration
Clustering in light neutron-rich nuclei
Improving WASH for urban settings under stress of migrants
Cooling – Storage Ring & RF
Computers’ Basic Organization
Multidimensional Arrays
Recitation 13 Searching and Sorting.
Dynamic Array Multidimensional Array Matric Operation with Array
Pointers and Arrays in C and Assembly Language
C++ Interlude 2 Pointers, Polymorphism, and Memory Allocation
INC 161 , CPE 100 Computer Programming
Algorithm Analysis and Modeling
CSC 253 Lecture 8.
CSC 253 Lecture 8.
Arrays November 8, 2017.
Lecture 12 Oct 16, 02.
Add or Subtract? x =.
Initializing variables
Linear Search (Area Code Example)
C Programming Pointers
Presentation transcript:

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