Resolução cormem
to Accompany
Introduction to Algorithms
Second Edition by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein
The MIT Press Cambridge, Massachusetts
London, England Dubuque, IA St. Louis Montr´ al e Madison, WI Toronto
McGraw-Hill Book Company Boston Burr Ridge, IL New York San Francisco
Instructor’s Manual by Thomas H. Cormen, Clara Lee, and Erica Lin to Accompany Introduction to Algorithms, Second Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein Published by The MIT Press and McGraw-Hill Higher Education, an imprint of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020. Copyright c 2002 by The Massachusetts Institute of Technology and The McGraw-Hill Companies, Inc. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The MIT Press or The McGraw-Hill Companies, Inc., including, but not limited to, network or other electronic storage or transmission, or broadcast for distance learning.
Contents
Revision History Preface P-1
R-1
Chapter 2: Getting Started Lecture Notes 2-1 Solutions 2-16 Chapter 3: Growth of Functions Lecture Notes 3-1 Solutions 3-7 Chapter 4: Recurrences Lecture Notes 4-1 Solutions 4-8 Chapter 5: Probabilistic Analysis and Randomized Algorithms Lecture Notes 5-1 Solutions 5-8 Chapter 6: Heapsort Lecture Notes 6-1 Solutions 6-10 Chapter 7: Quicksort Lecture Notes 7-1 Solutions 7-9 Chapter 8: Sorting in Linear Time Lecture Notes 8-1 Solutions 8-9 Chapter 9: Medians and Order Statistics Lecture Notes 9-1 Solutions 9-9 Chapter 11: Hash Tables Lecture Notes 11-1 Solutions 11-16 Chapter 12: Binary Search Trees Lecture Notes 12-1 Solutions 12-12 Chapter 13: Red-Black Trees Lecture Notes 13-1 Solutions 13-13 Chapter 14: Augmenting Data