Lecture19 - ECS 30 Introduction to Programming and Problem...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
ECS 30 Introduction to Programming and Problem Solving François Gygi Department of Computer Science
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 19 • Chapter 8 • Multidimensional arrays • Measuring the performance of an algorithm • Algorithm complexity • More algorithms using arrays – searching
Background image of page 2
Multidimensional arrays int x[3][2]; x[0] x[0][0] x[0][1] x[1][0] x[1][1] x[2][0] x[2][1] x[1] x[2] Row-major order: elements of a row are in consecutive memory cells
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Multidimensional arrays • Variable size array declaration int x[][2]; • For use in function headers only • Only the first dimension can be omitted • Intepretation: – The argument is a two-dimensional array having 2 columns and an unspecified number of rows
Background image of page 4
Computational complexity of sorting algorihtms • The number of operations depends on the size of the data (N)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/21/2012 for the course ECON 2a taught by Professor Xi during the Spring '11 term at Cornell College.

Page1 / 8

Lecture19 - ECS 30 Introduction to Programming and Problem...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online