12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sec. 3.9 Space Bounds 83pixel. Assume that each pixel can take any integer value in the range 0 <strong>to</strong> C − 1.The problem is <strong>to</strong> find the number of pixels of each color value <strong>and</strong> then sort thecolor values with respect <strong>to</strong> the number of times each value appears in the picture.Assume that the picture is a rectangle with P pixels. A pseudocode algorithm <strong>to</strong>solve the problem follows.for (i=0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!