Data Structures and Algorithms: A First Course

All young computer scientists who aspire to write programs must learn something about algorithms and data structures. This book does exactly that. Based on lecture courses developed by the author over a number of years the book is written in an informal a

  • PDF / 26,561,162 Bytes
  • 412 Pages / 439.37 x 666.142 pts Page_size
  • 14 Downloads / 266 Views

DOWNLOAD

REPORT


Springer

London Berlin Heidelberg New York Barcelona Budapest Hong Kong Milan Paris Santa Clara Singapore Tokyo

lain T. Adamson

Data Structures and Algorithms: AFirst Course

i

Springer

lain T. Adamson, BSc, MSc, AM, PhD Department of Mathematics University of Dundee 23 Perth Road, Dundee DDI 41IN, UK

ISBN·13:978-3-540-76047-4 British Library Cataloguing in Publication Data Adamson, lain T. Data structures and algorithms : a first course I.Data structures (Computer science) 2.A1gorithms I.Title 005.7'3 ISBN·13:978·3·540-76047-4 Library of Congress Cataloging·in.Publication Data Adamson, lain T. Data structures and algorithms : a first course 1 lain T. Adamson. p. em. Includes index. ISBN·13:978·3·540-76047-4 e-ISBN·13:978-1-4471·1023·1 DOl: 10.10071978-1-4471·1023·1 1. Data structures (Computer science) I. Title. QA76.9.D33A33 1996 005.13'3 •• dc20

2. Computer algorithms. 96-9537 CIP

Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permis~ion in writing of the publishers, or in the case of reprographic reproduction in accordance With the terms oflicences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers.

© Springer· Verlag London Limited 1996 The use of registered names, trademarks etc. in this publication docs not imply, even in the absence of a specific statement, that such names are exempt from the relevant laws and regulations and therefore free for general use. The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made. Typesetting: camera ready by author 34/3830·543210 Printed on acid·free paper

PREFACE In 1976 Niklaus Wirth, the inventor of Pascal, published a book entitled Algorithms + Data Structures = Progmms. If the assertion of Wirth's title is correct-and it would be hard to dispute it-all young computer scientists who aspire to write programs must learn something about algorithms and data structures. This book is intended to help them do that. It is based on lecture courses developed over the past few years and I hope that at least some of the informality of the classroom and the spoken word has been transferred to the printed page. The lectures were given to first and second year students in The University of Dundee who had been well-grounded in Pascal and who had therefore already met some elementary data structures and sorting and searching algorithms; but only the syntax of Pascal was taken for granted, as it is in the book. My students had rather varied mathematical backgrounds and some were not very well-disposed to old-fashioned algebraic manipulation. A little of this (and a brief mention of limits) does appear in th