[FREE PDF sample] Handbook of Data Structures and Applications Dinesh P. Mehta ebooks

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Handbook of Data Structures and Applications


Dinesh P. Mehta

https://textbookfull.com/product/handbook-of-data-
structures-and-applications-dinesh-p-mehta/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Probabilistic data structures and algorithms for big data


applications Gakhov

https://textbookfull.com/product/probabilistic-data-structures-and-
algorithms-for-big-data-applications-gakhov/

textboxfull.com

Advanced Data Structures Theory and Applications 1st


Edition Suman Saha

https://textbookfull.com/product/advanced-data-structures-theory-and-
applications-1st-edition-suman-saha/

textboxfull.com

Advances in Big Data and Cloud Computing Proceedings of


ICBDCC18 J. Dinesh Peter

https://textbookfull.com/product/advances-in-big-data-and-cloud-
computing-proceedings-of-icbdcc18-j-dinesh-peter/

textboxfull.com

Learning functional data structures and algorithms learn


functional data structures and algorithms for your
applications and bring their benefits to your work now
Khot
https://textbookfull.com/product/learning-functional-data-structures-
and-algorithms-learn-functional-data-structures-and-algorithms-for-
your-applications-and-bring-their-benefits-to-your-work-now-khot/
textboxfull.com
Big Data Analytics with Java 1st Edition Rajat Mehta

https://textbookfull.com/product/big-data-analytics-with-java-1st-
edition-rajat-mehta/

textboxfull.com

Handbook of Statistical Analysis and Data Mining


Applications 2nd Edition Robert Nisbet

https://textbookfull.com/product/handbook-of-statistical-analysis-and-
data-mining-applications-2nd-edition-robert-nisbet/

textboxfull.com

Cloud Native Data Center Networking 1st Edition Dinesh G.


Dutt

https://textbookfull.com/product/cloud-native-data-center-
networking-1st-edition-dinesh-g-dutt/

textboxfull.com

Cloud Native Data Center Networking Architecture Protocols


and Tools Dinesh G. Dutt

https://textbookfull.com/product/cloud-native-data-center-networking-
architecture-protocols-and-tools-dinesh-g-dutt/

textboxfull.com

Learning Functional Data Structures and Algorithms Learn


functional data structures and algorithms for your
applications and bring their benefits to your work now 1st
Edition Atul S. Khot
https://textbookfull.com/product/learning-functional-data-structures-
and-algorithms-learn-functional-data-structures-and-algorithms-for-
your-applications-and-bring-their-benefits-to-your-work-now-1st-
edition-atul-s-khot/
textboxfull.com
Handbook of
Data Structures
and Applications
Second Edition
Handbook of
Data Structures
and Applications
Second Edition

Edited by
Dinesh P. Mehta
Sartaj Sahni
MATLAB R
is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the accuracy of the text or
exercises in this book. This book’s use or discussion of MATLABR
software or related products does not constitute endorsement or sponsorship
by The MathWorks of a particular pedagogical approach or particular use of the MATLAB R
software.

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742


c 2018 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper

International Standard Book Number-13: 978-1-4987-0185-3 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data
and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The
authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright
holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us
know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by
any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any
information storage or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or
contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organi-
zation that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a
separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation
without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Names: Mehta, Dinesh P., editor. | Sahni, Sartaj, editor.


Title: Handbook of data structures and applications / edited by Dinesh P. Mehta and Sartaj Sahni.
Other titles: Data structures and applications
Description: Second edition. | Boca Raton, Florida : CRC Press, [2018] | Includes bibliographical references and index.
Identifiers: LCCN 2017041375| ISBN 9781498701853 (hardback) | ISBN 9781315119335 (e-book)
Subjects: LCSH: System design--Handbooks, manuals, etc. | Data structures (Computer science)--Handbooks, manuals, etc.
Classification: LCC QA76.9.S88 H363 2005 | DDC 005.7/3--dc23 LC record available at https://lccn.loc.gov/2017041375

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
To our wives,
Usha Mehta and Neeta Sahni
Contents

Preface to the Second Edition .....................................................................................................................................xi


Preface to the First Edition........................................................................................................................................xiii
Editors .......................................................................................................................................................................... xv
Contributors ..............................................................................................................................................................xvii

PART I Fundamentals
1 Analysis of Algorithms ....................................................................................................................................... 3
Sartaj Sahni
2 Basic Structures ................................................................................................................................................. 23
Dinesh P. Mehta
3 Trees ................................................................................................................................................................... 35
Dinesh P. Mehta
4 Graphs ................................................................................................................................................................ 49
Narsingh Deo

PART II Priority Queues


5 Leftist Trees........................................................................................................................................................ 69
Sartaj Sahni
6 Skew Heaps ........................................................................................................................................................ 77
C. Pandu Rangan
7 Binomial, Fibonacci, and Pairing Heaps......................................................................................................... 85
Michael L. Fredman
8 Double-Ended Priority Queues ....................................................................................................................... 97
Sartaj Sahni

PART III Dictionary Structures


9 Hash Tables ......................................................................................................................................................117
Pat Morin
10 Bloom Filter and Its Variants .........................................................................................................................131
Shigang Chen
11 Balanced Binary Search Trees ........................................................................................................................151
Arne Andersson, Rolf Fagerberg, and Kim S. Larsen
12 Finger Search Trees .........................................................................................................................................171
Gerth Stølting Brodal

vii
viii Contents

13 Splay trees ........................................................................................................................................................179


Sanjeev Saxena
14 Randomized Dictionary Structures...............................................................................................................197
C. Pandu Rangan
15 Trees with Min Weighted Path Length..........................................................................................................215
Wojciech Rytter
16 B Trees ..............................................................................................................................................................233
Donghui Zhang

PART IV Multidimensional/Spatial Structures


17 Multidimensional Spatial Data Structures....................................................................................................251
Hanan Samet
18 Planar Straight Line Graphs ...........................................................................................................................277
Siu-Wing Cheng
19 Interval, Segment, Range, Priority Search Trees ..........................................................................................291
D. T. Lee and Hung-I Yu
20 Quadtrees and Octtrees ..................................................................................................................................309
Srinivas Aluru
21 BSP Trees..........................................................................................................................................................329
Bruce F. Naylor
22 R-Trees .............................................................................................................................................................343
Scott Leutenegger and Mario A. Lopez
23 Managing Spatio-Temporal Data ..................................................................................................................359
Sumeet Dua and S. S. Iyengar
24 Kinetic Data Structures ..................................................................................................................................377
Leonidas Guibas
25 Online Dictionary Structures.........................................................................................................................389
Teofilo F. Gonzalez
26 Cuttings............................................................................................................................................................397
Bernard Chazelle
27 Approximate Geom Query Structures ..........................................................................................................405
Christian A. Duncan and Michael T. Goodrich
28 Geometric and Spatial Data Structures in External Memory .....................................................................419
Jeffrey Scott Vitter

PART V Miscellaneous
29 Tries ..................................................................................................................................................................445
Sartaj Sahni
30 Suffix Trees and Suffix Arrays ........................................................................................................................461
Srinivas Aluru
31 String Searching ..............................................................................................................................................477
Andrzej Ehrenfeucht and Ross M. McConnell
Contents ix

32 Binary Decision Diagrams .............................................................................................................................495


Shin-ichi Minato
33 Persistent Data Structures ..............................................................................................................................511
Haim Kaplan
34 Data Structures for Sets ..................................................................................................................................529
Rajeev Raman
35 Cache Oblivious Data Structures...................................................................................................................545
Lars Arge, Gerth Stølting Brodal, and Rolf Fagerberg
36 Dynamic Trees.................................................................................................................................................567
Camil Demetrescu, Irene Finocchi, and Giuseppe F. Italiano
37 Dynamic Graphs .............................................................................................................................................581
Camil Demetrescu, Irene Finocchi, and Giuseppe F. Italiano
38 Succinct Representation of Data Structures .................................................................................................595
J. Ian Munro and S. Srinivasa Rao
39 Randomized Graph Data Structures .............................................................................................................611
Surender Baswana and Sandeep Sen
40 Searching and Priority Queues in o(log n) Time .........................................................................................627
Arne Andersson

PART VI Data Structures in Langs and Libraries


41 Functional Data Structures ............................................................................................................................639
Chris Okasaki
42 LEDA, a Platform for Combinatorial and Geometric Computing.............................................................653
Stefan Naeher
43 Data Structures in C++...................................................................................................................................667
Mark Allen Weiss
44 Data Structures in JDSL..................................................................................................................................679
Michael T. Goodrich, Roberto Tamassia, and Luca Vismara
45 Data Structure Visualization ..........................................................................................................................697
John Stasko
46 Drawing Trees..................................................................................................................................................707
Sebastian Leipert
47 Drawing Graphs ..............................................................................................................................................723
Peter Eades and Seok-Hee Hong
48 Concurrent Data Structures...........................................................................................................................741
Mark Moir and Nir Shavit

PART VII Applications


49 IP Router Tables ..............................................................................................................................................765
Sartaj Sahni, Kun Suk Kim, and Haibin Lu
50 Multidimensional Packet Classification........................................................................................................783
Pankaj Gupta
x Contents

51 Data Structures in Web Information Retrieval ............................................................................................799


Monika Henzinger
52 The Web as a Dynamic Graph .......................................................................................................................805
S. N. Maheshwari
53 Layout Data Structures ...................................................................................................................................817
Dinesh P. Mehta
54 Floorplan Rep in VLSI....................................................................................................................................833
Zhou Feng, Bo Yao, and Chung-Kuan Cheng
55 Computer Graphics.........................................................................................................................................857
Dale McMullin and Alyn Rockwood
56 Geographic Information Systems ..................................................................................................................871
Bernhard Seeger and Peter Widmayer
57 Collision Detection .........................................................................................................................................889
Ming C. Lin and Dinesh Manocha
58 Image Data Structures ....................................................................................................................................903
S. S. Iyengar, V. K. Vaishnavi, and S. Gunasekaran
59 Computational Biology ..................................................................................................................................917
Paolo Ferragina, Stefan Kurtz, Stefano Lonardi, and Giovanni Manzini
60 Data Structures for Cheminformatics...........................................................................................................935
Dinesh P. Mehta and John D. Crabtree
61 Elimination Structures in Scientific Computing..........................................................................................945
Alex Pothen and Sivan Toledo
62 Data Structures for Databases........................................................................................................................967
Joachim Hammer and Markus Schneider
63 Data Structures for Big Data Stores...............................................................................................................983
Arun A. Ravindran and Dinesh P. Mehta
64 Data Mining.....................................................................................................................................................997
Vipin Kumar, Pang-Ning Tan, and Michael Steinbach
65 Computational Geometry: Fundamental Structures.................................................................................1013
Mark de Berg and Bettina Speckmann
66 Computational Geometry: Proximity and Location..................................................................................1027
Sunil Arya and David M. Mount
67 Computational Geometry: Generalized (or Colored) Intersection Searching........................................1043
Prosenjit Gupta, Ravi Janardan, Saladi Rahul, and Michiel Smid
Index ........................................................................................................................................................................1059
Preface to the Second Edition

It has been over a decade since the first edition of this handbook was published in 2005. In this edition, we have attempted to
capture advances in data structures while retaining the seven-part structure of the first edition. As one would expect, the discipline
of data structures has matured with advances not as rapidly forthcoming as in the twentieth century. Nevertheless, there have
been areas that have seen significant progress that we have focused on in this edition.
We have added four new chapters on Bloom Filters; Binary Decision Diagrams; Data Structures for Cheminformatics; and
Data Structures for Big Data Stores. In addition, we have updated 13 other chapters from the original edition.

Dinesh P. Mehta
Sartaj Sahni
October 2017

xi
Preface to the First Edition

In the late 1960s, Donald Knuth, winner of the 1974 Turing Award, published his landmark book The Art of Computer Program-
ming: Fundamental Algorithms. This book brought together a body of knowledge that defined the data structures area. The term
data structure, itself, was defined in this book to be A table of data including structural relationships. Niklaus Wirth, the inven-
tor of the Pascal language and winner of the 1984 Turing award, stated that “Algorithms + Data Structures = Programs.” The
importance of algorithms and data structures has been recognized by the community and consequently, every undergraduate
Computer Science curriculum has classes on data structures and algorithms. Both of these related areas have seen tremendous
advances in the decades since the appearance of the books by Knuth and Wirth. Although there are several advanced and special-
ized texts and handbooks on algorithms (and related data structures), there is, to the best of our knowledge, no text or handbook
that focuses exclusively on the wide variety of data structures that have been reported in the literature. The goal of this handbook
is to provide a comprehensive survey of data structures of different types that are in existence today.
To this end, we have subdivided this handbook into seven parts, each of which addresses a different facet of data structures.
Part I is a review of introductory material. Although this material is covered in all standard data structures texts, it was included
to make the handbook self-contained and in recognition of the fact that there are many practitioners and programmers who
may not have had a formal education in computer science. Parts II through IV discuss Priority Queues, Dictionary Structures,
and Multidimensional structures, respectively. These are all well-known classes of data structures. Part V is a catch-all used for
well-known data structures that eluded easy classification. Parts I through V are largely theoretical in nature: they discuss the data
structures, their operations and their complexities. Part VI addresses mechanisms and tools that have been developed to facilitate
the use of data structures in real programs. Many of the data structures discussed in previous parts are very intricate and take
some effort to program. The development of data structure libraries and visualization tools by skilled programmers are of critical
importance in reducing the gap between theory and practice. Finally, Part VII examines applications of data structures. The
deployment of many data structures from Parts I through V in a variety of applications is discussed. Some of the data structures
discussed here have been invented solely in the context of these applications and are not well-known to the broader community.
Some of the applications discussed include Internet routing, web search engines, databases, data mining, scientific computing,
geographical information systems, computational geometry, computational biology, VLSI floorplanning and layout, computer
graphics and image processing.
For data structure and algorithm researchers, we hope that the handbook will suggest new ideas for research in data structures
and for an appreciation of the application contexts in which data structures are deployed. For the practitioner who is devising
an algorithm, we hope that the handbook will lead to insights in organizing data that make it possible to solve the algorithmic
problem more cleanly and efficiently. For researchers in specific application areas, we hope that they will gain some insight from
the ways other areas have handled their data structuring problems.
Although we have attempted to make the handbook as complete as possible, it is impossible to undertake a task of this mag-
nitude without some omissions. For this, we apologize in advance and encourage readers to contact us with information about
significant data structures or applications that do not appear here. These could be included in future editions of this handbook.
We would like to thank the excellent team of authors, who are at the forefront of research in data structures, who have contributed
to this handbook. The handbook would not have been possible without their painstaking efforts. We are extremely saddened by
the untimely demise of a prominent data structures researcher, Professor Gísli R. Hjaltason, who was to write a chapter for this
handbook. He will be missed greatly by the computer science community. Finally, we would like to thank our families for their
support during the development of the handbook.

Dinesh P. Mehta
Sartaj Sahni
April 2004

xiii
xiv Preface to the First Edition

MATLAB R
is a registered trademark of The MathWorks, Inc. For product information, please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098 USA Tel: 508 647 7000
Fax: 508-647-7001
E-mail: [email protected]
Web: www.mathworks.com
Editors

Dinesh P. Mehta has been on the faculty of the Colorado School of Mines since 2000, where he is currently professor in the
Department of Computer Science. He earned degrees (all in computer science) from the Indian Institute of Technology Bombay,
the University of Minnesota, and the University of Florida. Before joining Mines in 2000, he was on the faculty of the University
of Tennessee Space Institute, where he received the Vice President’s Award for Teaching Excellence in 1997. He was a visiting
professor at Intel’s Strategic CAD Labs for several months in 1996 and 1997 and at the Tata Research Development and Design
Center (in Pune, India) in 2007. He has also received graduate teaching awards at Mines in 2007, 2008, and 2009.
He was assistant department head from 2004 to 2008 and interim department head from 2008 to 2010 in the former Depart-
ment of Mathematical and Computer Sciences and served as president of the Mines Faculty Senate in 2016–2017.
Dr. Mehta is the coauthor of the book, Fundamentals of Data Structures in C++ and coeditor of the Handbook of Algorithms
for VLSI Physical Design Automation. He serves as associate director of the ORwE (Operations Research with Engineering) PhD
program at Mines and is currently an associate editor of ACM Computing Surveys. His current research interests are in chemin-
formatics, computational materials, and big graph analytics.
Sartaj Sahni is a distinguished professor of computer and information sciences and engineering at the University of Florida. He
is also a member of the European Academy of Sciences, a Fellow of IEEE, ACM, AAAS, and Minnesota Supercomputer Institute,
and a distinguished alumnus of the Indian Institute of Technology, Kanpur. Dr. Sahni is the recipient of the 1997 IEEE Computer
Society Taylor L. Booth Education Award, the 2003 IEEE Computer Society W. Wallace McDowell Award, and the 2003 ACM Karl
Karlstrom Outstanding Educator Award. Dr. Sahni earned his BTech (electrical engineering) degree from the Indian Institute of
Technology, Kanpur, and MS and PhD in computer science from Cornell University. Dr. Sahni has published over 400 research
papers and written 15 books. His research publications are on the design and analysis of efficient algorithms, parallel computing,
interconnection networks, design automation, and medical algorithms.
Dr. Sahni is the editor-in-chief of the ACM Computing Surveys, a managing editor of the International Journal of Foundations
of Computer Science, and a member of the editorial boards of 17 other journals. He is a past coeditor-in-chief of the Journal of
Parallel and Distributed Computing. He has served as program committee chair, general chair, and a keynote speaker at many
conferences. Dr. Sahni has served on several NSF (National Science Foundation) and NIH (National Institutes of Health) panels
and he has been involved as an external evaluator of several computer science and engineering departments.

xv
Contributors

Srinivas Aluru Siu-Wing Cheng


Georgia Institute of Technology The Hong Kong University of Science
Atlanta, Georgia and Technology
Kowloon, Hong Kong
Arne Andersson
Uppsala University Camil Demetrescu
Uppsala, Sweden Sapienza University of Rome
Rome, Italy
Lars Arge
University of Aarhus Narsingh Deo
Aarhus, Denmark University of Central Florida
Orlando, Florida
Sunil Arya
The Hong Kong University of Science Sumeet Dua
and Technology Louisiana Tech University
Kowloon, Hong Kong Ruston, Louisiana

Surender Baswana Christian A. Duncan


Indian Institute of Technology, Kanpur Quinnipiac University
Kanpur, India Hamden, Connecticut

Mark de Berg Peter Eades


Eindhoven University of Technology University of Sydney
Eindhoven, The Netherlands Sydney, Australia

Gerth Stølting Brodal Andrzej Ehrenfeucht


University of Aarhus University of Colorado
Aarhus, Denmark Boulder, Colorado

Bernard Chazelle Rolf Fagerberg


Department of Computer Science University of Southern Denmark
Princeton University Odense, Denmark
Princeton, New Jersey
Zhou Feng
John D. Crabtree Fudan University
Department of Computer Science Shanghai, China
and Information Systems
University of North Alabama Paolo Ferragina
Florence, Alabama Università di Pisa
Pisa, Italy
Shigang Chen
Computer and Information Science Irene Finocchi
and Engineering Department of Computer Science
University of Florida Sapienza University of Rome
Gainesville, Florida Rome, Italy

Chung-Kuan Cheng Michael L. Fredman


University of California Rutgers University
San Diego, California New Brunswick, New Jersey

xvii
xviii Contributors

Teofilo F. Gonzalez Kim S. Larsen


Department of Computer Science University of Southern Denmark
University of California Odense, Denmark
Santa Barbara, California
D. T. Lee
Michael T. Goodrich Institute of Information Science
University of California Academia Sinica
Irvine, California Taipei, Taiwan

Leonidas Guibas Scott Leutenegger


Stanford University Department of Computer Science
Palo Alto, California University of Denver
Denver, Colorado
Prosenjit Gupta
Ming C. Lin
Department of Computer Science
University of North Carolina
and Engineering
Chapel Hill, North Carolina
NIIT University
Rajasthan, India
Stefano Lonardi
University of California, Riverside
Monika Henzinger Riverside, California
University of Vienna
Vienna, Austria Mario A. Lopez
Department of Computer Science
Seok-Hee Hong University of Denver
University of Sydney Denver, Colorado
Sydney, Australia
S. N. Maheshwari
Giuseppe F. Italiano Indian Institute of Technology Delhi
Department of Civil Engineering Delhi, India
and Computer Science Engineering
University of Rome Dinesh Manocha
Tor Vergata Rome, Italy University of North Carolina
Chapel Hill, North Carolina
S. S. Iyengar
Florida International University Giovanni Manzini
Miami, Florida Università del Piemonte Orientale
Vercelli VC, Italy
Ravi Janardan
Department of Computer Science and Engineering Ross M. McConnell
University of Minnesota Colorado State University
Minneapolis, Minnesota Fort Collins, Colorado

Dinesh P. Mehta
Haim Kaplan
Department of Computer Science
Tel Aviv University
Colorado School of Mines
Tel Aviv, Israel
Golden, Colorado

Vipin Kumar Shin-ichi Minato


University of Minnesota Hokkaido University
Minneapolis, Minnesota Sapporo, Japan

Stefan Kurtz Pat Morin


University of Hamburg Carleton University
Hamburg, Germany Ottawa, Ontario, Canada
Contributors xix

David M. Mount Institute for Advanced Computer Studies


University of Maryland University of Maryland
College Park, Maryland College Park, Maryland

J. Ian Munro Sanjeev Saxena


University of Waterloo Department of Computer Science & Engineering
Waterloo, Ontario, Canada Indian Institute of Technology, Kanpur
Kanpur, India
Stefan Naeher
Department of Computer Science Markus Schneider
University of Trier University of Florida
Trier, Germany Gainesville, Florida
Chris Okasaki
Bernhard Seeger
United States Military Academy
University of Marburg
West Point, New York
Marburg, Germany
Alex Pothen
Computer Science Department Purdue University Sandeep Sen
West Lafayette, Indiana Indian Institute of Technology, Delhi
New Delhi, India
Saladi Rahul
Department of Computer Science Michiel Smid
University of Illinois School of Computer Science
Urbana, Illinois Carleton University
Ottawa, Ontario, Canada
Rajeev Raman
University of Leicester Bettina Speckmann
Leicester, United Kingdom Eindhoven University of Technology
Eindhoven, The Netherlands
C. Pandu Rangan
Indian Institute of Technology, Madras John Stasko
Chennai, India School of Interactive Computing
Georgia Institute of Technology
S. Srinivasa Rao Atlanta, Georgia
Seoul National University
Seoul, South Korea Michael Steinbach
University of Minnesota
Arun A. Ravindran Minneapolis, Minnesota
Department of Electrical and Computer Engineering
University of North Carolina at Charlotte Roberto Tamassia
Charlotte, North Carolina Brown University
Providence, Rhode Island
Wojciech Rytter
Warsaw University Pang-Ning Tan
Warsaw, Poland Michigan State University
East Lansing, Michigan
Sartaj Sahni
University of Florida Sivan Toledo
Gainesville, Florida Tel Aviv University
Tel Aviv, Israel
Hanan Samet
Computer Science Department Luca Vismara
Center for Automation Research Brown University, Providence
and Rhode Island
xx Contributors

Jeffrey Scott Vitter Bo Yao


Department of Computer and Information Science University of California
The University of Mississippi San Diego, California
Oxford, Mississippi
Hung-I Yu
Mark Allen Weiss Institute of Information Science
Florida International University Academia Sinica
Miami, Florida Taipei, Taiwan

Peter Widmayer
ETH Zürich
Zürich, Switzerland
I
Fundamentals
1 Analysis of Algorithms Sartaj Sahni ..............................................................................................................................3
Introduction • Operation Counts • Step Counts • Counting Cache Misses • Asymptotic
Complexity • Recurrence Equations • Amortized Complexity • Practical Complexities •
Acknowledgments • References

2 Basic Structures Dinesh P. Mehta.................................................................................................................................23


Introduction • Arrays • Linked Lists • Stacks and Queues • Acknowledgments • References

3 Trees Dinesh P. Mehta ....................................................................................................................................................35


Introduction • Tree Representation • Binary Trees and Properties • Binary Tree Traversals •
Threaded Binary Trees • Binary Search Trees • Heaps • Tournament Trees • Acknowledgments •
References

4 Graphs Narsingh Deo ....................................................................................................................................................49


Introduction • Graph Representations • Connectivity, Distance, and Spanning Trees • Searching a
Graph • Simple Applications of DFS and BFS • Minimum Spanning Tree • Shortest Paths •
Eulerian and Hamiltonian Graphs • Acknowledgments • References

1
1
Analysis of Algorithms*
1.1 Introduction...................................................................................................................... 3
1.2 Operation Counts............................................................................................................. 4
1.3 Step Counts ....................................................................................................................... 5
1.4 Counting Cache Misses.................................................................................................... 7
A Simple Computer Model • Effect of Cache Misses on Run Time • Matrix Multiplication
1.5 Asymptotic Complexity ................................................................................................... 9
Big Oh Notation (O) • Omega () and Theta () Notations • Little Oh Notation (o)
1.6 Recurrence Equations .................................................................................................... 12
Substitution Method • Table-Lookup Method
1.7 Amortized Complexity................................................................................................... 14
What Is Amortized Complexity? • Maintenance Contract • The McWidget Company •
Subset Generation
1.8 Practical Complexities.................................................................................................... 20
Sartaj Sahni Acknowledgments ..................................................................................................................... 21
University of Florida References................................................................................................................................... 21

1.1 Introduction
The topic “Analysis of Algorithms” is concerned primarily with determining the memory (space) and time requirements
(complexity) of an algorithm. Since the techniques used to determine memory requirements are a subset of those used
to determine time requirements, in this chapter, we focus on the methods used to determine the time complexity of an
algorithm.
The time complexity (or simply, complexity) of an algorithm is measured as a function of the problem size. Some examples
are given below.

1. The complexity of an algorithm to sort n elements may be given as a function of n.


2. The complexity of an algorithm to multiply an m × n matrix and an n × p matrix may be given as a function of m,
n, and p.
3. The complexity of an algorithm to determine whether x is a prime number may be given as a function of the number, n,
of bits in x. Note that n = log2 (x + 1).

We partition our discussion of algorithm analysis into the following sections.

1. Operation counts
2. Step counts
3. Counting cache misses
4. Asymptotic complexity
5. Recurrence equations
6. Amortized complexity
7. Practical complexities

See [1–4] for additional material on algorithm analysis.

* This chapter has been reprinted from first edition of this Handbook, without any content updates.

3
4 Handbook of Data Structures and Applications

1.2 Operation Counts


One way to estimate the time complexity of a program or method is to select one or more operations, such as add, multiply,
and compare, and to determine how many of each is done. The success of this method depends on our ability to identify the
operations that contribute most to the time complexity.

EXAMPLE 1.1
[Max Element] Figure 1.1 gives an algorithm that returns the position of the largest element in the array a[0:n-1].
When n > 0, the time complexity of this algorithm can be estimated by determining the number of comparisons made
between elements of the array a. When n ≤ 1, the for loop is not entered. So no comparisons between elements of a
are made. When n > 1, each iteration of the for loop makes one comparison between two elements of a, and the total
number of element comparisons is n-1. Therefore, the number of element comparisons is max{n-1, 0}. The method max
performs other comparisons (e.g., each iteration of the for loop is preceded by a comparison between i and n) that are
not included in the estimate. Other operations such as initializing positionOfCurrentMax and incrementing the for
loop index i are also not included in the estimate.

int max(int [] a, int n)


{
if (n < 1) return -1; // no max
int positionOfCurrentMax = 0;
for (int i = 1; i < n; i++)
if (a[positionOfCurrentMax] < a[i]) positionOfCurrentMax = i;
return positionOfCurrentMax;
}

FIGURE 1.1 Finding the position of the largest element in a[0:n-1].

The algorithm of Figure 1.1 has the nice property that the operation count is precisely determined by the problem size.
For many other problems, however, this is not so. Figure 1.2 gives an algorithm that performs one pass of a bubble sort. In
this pass, the largest element in a[0:n-1] relocates to position a[n-1]. The number of swaps performed by this algorithm
depends not only on the problem size n but also on the particular values of the elements in the array a. The number of
swaps varies from a low of 0 to a high of n − 1.

void bubble(int [] a, int n)


{
for (int i = 0; i < n - 1; i++)
if (a[i] > a[i+1]) swap(a[i], a[i+1]);
}

FIGURE 1.2 A bubbling pass.

Since the operation count isn’t always uniquely determined by the problem size, we ask for the best, worst, and average
counts.

EXAMPLE 1.2
[SEQUENTIAL SEARCH] Figure 1.3 gives an algorithm that searches a[0:n-1] for the first occurrence of x. The number
of comparisons between x and the elements of a isn’t uniquely determined by the problem size n. For example, if n = 100
and x = a[0], then only 1 comparison is made. However, if x isn’t equal to any of the a[i]s, then 100 comparisons are
made.
A search is successful when x is one of the a[i]s. All other searches are unsuccessful. Whenever we have an unsuccessful
search, the number of comparisons is n. For successful searches the best comparison count is 1, and the worst is n. For the
average count assume that all array elements are distinct and that each is searched for with equal frequency. The average
Analysis of Algorithms 5

count for a successful search is


1
n
i = (n + 1)/2
n
i=1

int sequentialSearch(int [] a, int n, int x)


{
// search a[0:n-1] for x
int i;
for (i = 0; i < n && x != a[i]; i++);
if (i == n) return -1; // not found
else return i;
}

FIGURE 1.3 Sequential search.

EXAMPLE 1.3
[Insertion into a Sorted Array] Figure 1.4 gives an algorithm to insert an element x into a sorted array
a[0:n-1].
We wish to determine the number of comparisons made between x and the elements of a. For the problem size, we
use the number n of elements initially in a. Assume that n ≥ 1. The best or minimum number of comparisons is 1, which
happens when the new element x

void insert(int [] a, int n, int x)


{
// find proper place for x
int i;
for (i = n - 1; i >= 0 && x < a[i]; i--)
a[i+1] = a[i];

a[i+1] = x; // insert x
}

FIGURE 1.4 Inserting into a sorted array.

is to be inserted at the right end. The maximum number of comparisons is n, which happens when x is to be inserted at
the left end. For the average assume that x has an equal chance of being inserted into any of the possible n+1 positions. If
x is eventually inserted into position i+1 of a, i ≥ 0, then the number of comparisons is n-i. If x is inserted into a[0],
the number of comparisons is n. So the average count is
n−1  ⎛ ⎞
1  1 ⎝
n
1 n(n + 1) n n
(n − i) + n = j + n⎠ = +n = +
n+1 n+1 n+1 2 2 n+1
i=0 j=1

This average count is almost 1 more than half the worst-case count.

1.3 Step Counts


The operation-count method of estimating time complexity omits accounting for the time spent on all but the chosen operations.
In the step-count method, we attempt to account for the time spent in all parts of the algorithm. As was the case for operation
counts, the step count is a function of the problem size.
A step is any computation unit that is independent of the problem size. Thus 10 additions can be one step; 100 multiplications
can also be one step; but n additions, where n is the problem size, cannot be one step. The amount of computing represented by
one step may be different from that represented by another. For example, the entire statement
return a+b+b*c+(a+b-c)/(a+b)+4;
6 Handbook of Data Structures and Applications

TABLE 1.1 Best-Case Step Count for Figure 1.3


Statement s/e Frequency Total Steps
int sequentialSearch(··· ) 0 0 0
{ 0 0 0
int i; 1 1 1
for (i = 0; i < n && x != a[i]; i++); 1 1 1
if (i == n) return -1; 1 1 1
else return i; 1 1 1
} 0 0 0
Total 4

TABLE 1.2 Worst-Case Step Count for Figure 1.3


Statement s/e Frequency Total Steps
int sequentialSearch(··· ) 0 0 0
{ 0 0 0
int i; 1 1 1
for (i = 0; i < n && x != a[i]; i++); 1 n+1 n+1
if (i == n) return -1; 1 1 1
else return i; 1 0 0
} 0 0 0
Total n+3

TABLE 1.3 Step Count for Figure 1.3 When x = a[j]


Statement s/e Frequency Total Steps
int sequentialSearch(··· ) 0 0 0
{ 0 0 0
int i; 1 1 1
for (i = 0; i < n && x != a[i]; i++); 1 j+1 j+1
if (i == n) return -1; 1 1 1
else return i; 1 1 1
} 0 0 0
Total j+4

can be regarded as a single step if its execution time is independent of the problem size. We may also count a statement such as
x = y;

as a single step.
To determine the step count of an algorithm, we first determine the number of steps per execution (s/e) of each statement
and the total number of times (i.e., frequency) each statement is executed. Combining these two quantities gives us the total
contribution of each statement to the total step count. We then add the contributions of all statements to obtain the step count
for the entire algorithm.

EXAMPLE 1.4
[Sequential Search] Tables 1.1 and 1.2 show the best- and worst-case step-count analyses for sequentialSearch
(Figure 1.3).
For the average step-count analysis for a successful search, we assume that the n values in a are distinct and that in a
successful search, x has an equal probability of being any one of these values. Under these assumptions the average step
count for a successful search is the sum of the step counts for the n possible successful searches divided by n. To obtain this
average, we first obtain the step count for the case x = a[j] where j is in the range [0, n − 1] (see Table 1.3).
Analysis of Algorithms 7

Now we obtain the average step count for a successful search:

1
n−1
(j + 4) = (n + 7)/2
n
j=0

This value is a little more than half the step count for an unsuccessful search.
Now suppose that successful searches occur only 80% of the time and that each a[i] still has the same probability of
being searched for. The average step count for sequentialSearch is

0.8 ∗ (average count for successful searches) + 0.2 ∗ (count for an unsuccessful search)
= 0.8(n + 7)/2 + 0.2(n + 3)
= 0.6n + 3.4

1.4 Counting Cache Misses


1.4.1 A Simple Computer Model
Traditionally, the focus of algorithm analysis has been on counting operations and steps. Such a focus was justified when com-
puters took more time to perform an operation than they took to fetch the data needed for that operation. Today, however, the
cost of performing an operation is significantly lower than the cost of fetching data from memory. Consequently, the run time of
many algorithms is dominated by the number of memory references (equivalently, number of cache misses) rather than by the
number of operations. Hence, algorithm designers focus on reducing not only the number of operations but also the number of
memory accesses. Algorithm designers focus also on designing algorithms that hide memory latency.
Consider a simple computer model in which the computer’s memory consists of an L1 (level 1) cache, an L2 cache, and main
memory. Arithmetic and logical operations are performed by the arithmetic and logic unit (ALU) on data resident in registers
(R). Figure 1.5 gives a block diagram for our simple computer model.
Typically, the size of main memory is tens or hundreds of megabytes; L2 cache sizes are typically a fraction of a megabyte; L1
cache is usually in the tens of kilobytes; and the number of registers is between 8 and 32. When you start your program, all your
data are in main memory.
To perform an arithmetic operation such as an add, in our computer model, the data to be added are first loaded from memory
into registers, the data in the registers are added, and the result is written to memory.
Let one cycle be the length of time it takes to add data that are already in registers. The time needed to load data from L1 cache
to a register is two cycles in our model. If the required data are not in L1 cache but are in L2 cache, we get an L1 cache miss and
the required data are copied from L2 cache to L1 cache and the register in 10 cycles. When the required data are not in L2 cache
either, we have an L2 cache miss and the required data are copied from main memory into L2 cache, L1 cache, and the register in
100 cycles. The write operation is counted as one cycle even when the data are written to main memory because we do not wait
for the write to complete before proceeding to the next operation. For more details on cache organization, see [5].

1.4.2 Effect of Cache Misses on Run Time


For our simple model, the statement a = b + c is compiled into the computer instructions
load a; load b; add; store c;

where the load operations load data into registers and the store operation writes the result of the add to memory. The add
and the store together take two cycles. The two loads may take anywhere from 4 cycles to 200 cycles depending on whether
we get no cache miss, L1 misses, or L2 misses. So the total time for the statement a = b + c varies from 6 cycles to 202 cycles.
In practice, the variation in time is not as extreme because we can overlap the time spent on successive cache misses.

ALU
main
L2 memory
R L1

FIGURE 1.5 A simple computer model.


8 Handbook of Data Structures and Applications

Suppose that we have two algorithms that perform the same task. The first algorithm does 2000 adds that require 4000 load,
2000 add, and 2000 store operations and the second algorithm does 1000 adds. The data access pattern for the first algorithm
is such that 25% of the loads result in an L1 miss and another 25% result in an L2 miss. For our simplistic computer model, the
time required by the first algorithm is 2000 ∗ 2 (for the 50% loads that cause no cache miss) + 1000 ∗ 10 (for the 25% loads that
cause an L1 miss) + 1000 ∗ 100 (for the 25% loads that cause an L2 miss) + 2000 ∗ 1 (for the adds) + 2000 ∗ 1 (for the stores)
= 118,000 cycles. If the second algorithm has 100% L2 misses, it will take 2000 ∗ 100 (L2 misses) + 1000 ∗ 1 (adds) + 1000 ∗ 1
(stores) = 202,000 cycles. So the second algorithm, which does half the work done by the first, actually takes 76% more time
than is taken by the first algorithm.
Computers use a number of strategies (such as preloading data that will be needed in the near future into cache, and when a
cache miss occurs, the needed data as well as data in some number of adjacent bytes are loaded into cache) to reduce the number
of cache misses and hence reduce the run time of a program. These strategies are most effective when successive computer
operations use adjacent bytes of main memory.
Although our discussion has focused on how cache is used for data, computers also use cache to reduce the time needed to
access instructions.

1.4.3 Matrix Multiplication


The algorithm of Figure 1.6 multiplies two square matrices that are represented as two-dimensional arrays. It performs the fol-
lowing computation:
n
c[i][j] = a[i][k] ∗ b[k][j], 1 ≤ i ≤ n, 1 ≤ j ≤ n (1.1)
k=1

Figure 1.7 is an alternative algorithm that produces the same two-dimensional array c as is produced by Figure 1.6. We observe
that Figure 1.7 has two nested for loops that are not present in Figure 1.6 and does more work than is done by Figure 1.6 with
respect to indexing into the array c. The remainder of the work is the same.
You will notice that if you permute the order of the three nested for loops in Figure 1.7, you do not affect the result array c.
We refer to the loop order in Figure 1.7 as ijk order. When we swap the second and third for loops, we get ikj order. In all,
there are 3! = 6 ways in which we can order the three nested for loops. All six orderings result in methods that perform exactly

void squareMultiply(int [][] a, int [][] b, int [][] c, int n)


{
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
{
int sum = 0;
for (int k = 0; k < n; k++)
sum += a[i][k] * b[k][j];
c[i][j] = sum;
}
}

FIGURE 1.6 Multiply two n × n matrices.

void fastSquareMultiply(int [][] a, int [][] b, int [][] c, int n)


{
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
c[i][j] = 0;

for (int i = 0; i < n; i++)


for (int j = 0; j < n; j++)
for (int k = 0; k < n; k++)
c[i][j] += a[i][k] * b[k][j];
}

FIGURE 1.7 Alternative algorithm to multiply square matrices.


Exploring the Variety of Random
Documents with Different Content
welcome. This application for entertainment was always made
according to the custom of the people, and in their own vernacular,
which I will illustrate by an example.
In my horseback-journeyings I had reached the tall, dense, heavy
forests of the bottom-lands of the Mississippi River, about a dozen
miles from the Father of Waters. As the sun was about setting, I
came upon a large "dead'ning," where the underbrush had been cut
out and burned off, the large trees had been girdled and had died,
and a crop of corn had been raised among the dead forest-trees,
before the new-comer in this wilderness had been able to completely
clear a field around his newly-erected log-cabin. Turning off from the
corduroy-road upon which I had been traveling, I took a footpath,
and, following that, was soon as near the cabin as a high rail-fence
would allow me to approach on horseback. A short distance from this
log-cabin was a still smaller one occupied by a colored aunty and her
family, and used for a kitchen; and not far off still another log-
building, used for a barn and stable.
The most of my readers in the older sections of the country will
suppose that I had now only to dismount, hitch my horse, climb the
fence, rap at the door, and so gain admittance to my resting-place for
the night. Far otherwise. Only the most untraveled and
inexperienced in the Brush would undertake so rash an experiment.
Sitting upon my horse, I called out in a loud voice, "Hello there!" That
call was for the same purpose that the city pastor mounts the stone
steps and rings the bell at the door of his parishioner. It was rather
more effective.
A large pack of hounds and various other kinds of dogs responded
with a barking chorus, a group of black pickaninnies rushed from the
adjacent kitchen, followed to the door by their sable mother, with
arms a-kimbo and hands fresh from mixing the pone or corn-dodger
for the family supper; all, with distended eyes and mouth, and
shining ivory, staring at the stranger with excited and pleased
curiosity. At almost the same instant, the mistress of the incipient
plantation approached the door of her cabin, stockingless and
shoeless, with a dress of woolsey woven in her own loom by her own
hands, and cut and made by her own skill, with face not less pleased
and excited than the others, and her cordial greeting of "How d'y,
stranger—how d'y, sir? 'Light, sir! [alight]—'light, sir!"
Remaining upon my horse, I replied: "I am a stranger in these parts,
madam. I have ridden about fifty miles since morning and am very
tired. Can I get to stay with you to-night, madam?"
"Oh, yes," she replied, promptly, "if you can put up with our rough
fare. We never turn anybody away."
I told her I should be very glad to stay with her, and dismounted. The
dogs, who would otherwise have resisted my approach to the door
by a combined attack, obeyed their instructions not to harm me, and
granted me a safe entrance as a recognized friend.
Such was the universal training of the dogs, and such the uniform
method of approaching and gaining admittance to the houses of the
people in the Brush. My hostess informed me that her husband was
at work in the "dead'ning," but that he would soon be at home and
take care of my horse.
I told her that I could do that myself, and she sent her little son along
with me to the stable, where I bestowed that kind and, I may say,
affectionate care that one who journeys for years on horseback
learns to bestow upon his faithful horse. I then entered the cabin,
and received that warm welcome that awaits the traveler in our
Western wilds.
Shall I describe my home for the night? It was a new log-house, less
than twenty feet square, and advanced to a state of completeness
beyond many in which I had lodged, inasmuch as the large openings
between the logs had been filled with "chink and daubing." The
chimney, built upon the outside of the house, was made of split
sticks, laid up in the proper form, and thoroughly "daubed" with mud,
so as to prevent them from taking fire. A large opening cut through
the logs communicated with this chimney, and formed the ample
fireplace. The roof was made of "shakes"—pieces of timber rived out
very much in the form of staves, but not shaved at all. These were
laid upon the roof like shingles, except that they were not nailed on,
but "weighted on"—kept in their places by small timbers laid across
each row of "shakes" over the entire roof. These timbers were kept
in their places by shorter ones placed between them, transversely,
up and down the roof. In this manner the pioneer constructs a roof
for his cabin, by his own labor, without the expenditure of a dime for
nails. With wooden hinges and a wooden latch for his door, he needs
to purchase little but glass for his windows, to provide a comfortable
home for his family. His latch-string, made of hemp or flax that he
has raised, or from the skin of the deer which he has pursued and
slain in the chase, which, as the old song has it—
"Hangs outside the door,"
symbolizes the cordial welcome and abounding hospitality to be
found within.
At the end of the room opposite the fireplace there was a bed in
each corner, under one of which there was a "trundle-bed" for the
children. There was no chamber-floor or chamber above to obstruct
the view of the roof. There was no division into apartments, not even
by hanging up blankets, a device I have seen resorted to in less
primitive regions. From floor to roof, from wall to wall, all was a single
"family" room, which was evidently to be occupied by the family and
myself in common. A rough board table, some plain chairs, and a
very few other articles completed the inventory of household
furniture of the pioneer's home to which I had been welcomed.
Such a home was the birthplace of Lincoln, and many other of the
greatest, wisest, and best men that have ever blessed our country.
Such homes have been crowned with abundance, and have been
the scenes of as much real comfort and joy as any others in our
land.
I have found that curiosity is a trait that is not monopolized by any
one section of country or class of people. It belongs to all localities,
and to all grades and kinds of people. I therefore, in accordance with
what a pretty wide experience had taught me was the best course to
pursue, proceeded at once to gratify the curiosity of my hostess as to
who her guest was, and what business had brought him to this wild
region. I told her my name, and that I was a Presbyterian preacher,
and an agent of the American Bible Society. This not only satisfied
her curiosity, but was very gratifying information to her, and I
received a renewed and cordial welcome to her home as a minister
of the gospel.
In the course of the ordinary conversation and questions that attend
such a meeting of strangers in the Brush, I learned that she and her
husband had emigrated from a county some hundreds of miles east,
which I had several times visited in the prosecution of my mission,
and I was able to give her a great deal of information in regard to her
old neighbors and friends. We were in the midst of an earnest
conversation in regard to these people, when her husband came in
from his labors. On being introduced to me, and informed in regard
to my mission, he repeated the welcome his wife had already given
me to the hospitality of their cabin.
Our supper was such as is almost universally spread in the wilds of
the Southwest. It consisted of an abundance of hot corn-bread, fried
bacon, potatoes, and coffee. A hard day's labor and a long day's ride
prepared us to do it equal justice.
The evening wore rapidly away in conversation. Such pioneers are
not dull, stupid men. Their peculiar life gives activity to mind as well
as body. My host was anxious and glad to hear from the great
outside active world, with which I had more recently mingled, and
had questions to ask and views to give as to what was going on in
the political and religious world.
At length our wearied bodies made a plea for rest that could not be
refused, and I was invited to conduct their family worship. This
invitation was extended in the language and manner peculiar to the
Southern and Southwestern sections of the country. This is
universally as follows:
The Bible and hymn-book are brought forward by the host, and laid
upon the table or stand, when he turns to the preacher and says,
"Will you take the books, sir?"
That is the invitation to lead the devotions of the family in singing and
prayer. It has been my happy lot to receive and respond to that
invitation—as I did that night—in many hundreds of families and in
some of the wildest portions of our land.
The method of extending an invitation to "ask a blessing" before a
meal is quite as peculiar. Being seated at the table, the host, turning
to the preacher, says, "Will you make a beginning, sir?"—all at table
reverently bowing their heads as he extends the invitation, and while
the blessing is being asked.
So, too, I have "made a beginning" at many a hospitable board in
many different States. I did not that night make the mistake that is
reported of an inexperienced home-missionary explorer, in similar
circumstances, who, laboring under the impression that "to retire"
and "to go to bed" were synonymous terms, said, "Madam, I will
retire, if you please."
"Retire!" she rejoined; "we never retires, stranger. We just goes to
bed."
Sitting with the family before the large fireplace, I said, "Madam, I
have ridden a long distance to-day, and am very tired."
"You can go to bed at any time you wish, sir," said she. "Just take the
left-hand bed."
I withdrew behind their backs to "lay my garments by," took the left-
hand bed, turned my face to the left-hand wall, and slept soundly for
the night.
When I awoke in the morning, husband and wife had arisen and left
the room, he to feed his team, and she to attend to her household
duties in the kitchen. After an early breakfast, and again leading their
family devotions, I bade them good-by, with many thanks for their
kindness, and with repeated invitations on their part to be sure to
spend the night with them should I ever come that way again. But I
have never seen them since.
I have very often recalled a hospitable reception in the Brush, of a
very different character, the recollection of which has always been
exceedingly pleasant to me. Wishing to visit a rough, wild, remote
region, at a season of the year when the roads were almost
impassable on account of the spring rains and the mud, I concluded
to go the greater part of the distance by steamboats, down one river
and up another, and then ride about fifty miles in a stage or mail-
wagon. The roads would scarcely be called roads at all in most parts
of the country, and I shall not be able to give to many of my readers
any true idea of the exceeding roughness of that ride. A considerable
part of the way was through the bottom-lands of one of the smaller
Southwestern rivers that swell the volume of the Mississippi. A
recent freshet had left the high-water mark upon the trees several
feet higher than the backs of our horses; and as we jolted over the
small stumps and great roots of the trees, from which the earth had
been washed away by the freshet, I was wearied, exceedingly
wearied, by the rough road and comfortless vehicle in which I
traveled.
At length we came upon a very pleasant plantation, with a
comfortable house and surroundings, where the driver, a boy about
fifteen years old, told me he would feed his team, and we would get
our dinner. It was not an hotel. Mail-contractors in this region often
make such arrangements to procure feed for their horses and meals
for the few passengers that they carry, at private houses. As I
entered the house I was greeted with one of those calm, mild, sweet
faces that one never forgets. I should think that my hostess was
between thirty-five and forty years old. I was too weary to engage in
much conversation, and she was quiet, and said very little to me. As
I observed her movements about the room in preparing the dinner, I
thought I had never seen a face that presented a more perfect
picture of contentment and peace. I felt perfectly sure that she was a
Christian—that her face bespoke "the peace of God that passeth all
understanding." When she invited the driver and myself to take seats
at the table, I said, "Shall I ask a blessing, madam?"
With a smile she bowed assent, and, as I concluded and looked up,
her face was all radiant with joy, and she said excitedly, "You are a
preacher, sir!"
I replied, "Yes, madam."
"Well," she responded, "I am glad to see you. I love to see
preachers. I love to cook for them, and take care of them. I love to
have them in my house."
I told her who I was, explained the character of my mission, and
expressed, I trust with becoming warmth, my gratification at the
cordiality of her welcome.
"Oh," said she, "if I was a man, I know what I would do. I would do
nothing but preach. I'd go, and go, and go; and preach, and preach,
and preach. I wouldn't have anything to pester me. I wouldn't marry
nary woman in the world. I'd go, and go, and go—and preach, and
preach, and preach, until I could preach no longer; and then I'd lie
down—close my eyes—and—go on."
Was there ever a more graphic and truthful description of an earnest,
apostolic life? Was there ever a more simple, beautiful description of
a peaceful Christian death? They recall the statement of Paul, "This
one thing I do"; and the story of Stephen, "And when he had said
this, he fell asleep."
The people who have spent their lives deep in the Brush, as this
good woman had, have no other idea of a preacher of the gospel but
one whose duty and mission it is to "go" and "preach." They have
been accustomed to hearing but one message, or at most a few
messages, from their lips, and then hear their farewell words, listen
to their farewell songs, shake hands with them, and see them take
their departure to "go" and "preach" to others who, like them, dwell in
lone and solitary wilds. Meetings and partings like these have
originated and given their peculiar power to such refrains as—
"Say, brothers, will you meet us—
Say, brothers, will you meet us—
Say, brothers, will you meet us
On Canaan's happy shore?

"By the grace of God we'll meet you—


By the grace of God we'll meet you—
By the grace of God we'll meet you
On Canaan's happy shore."
This woman knew little of the great world—had little that it calls
culture; her language was that of the people among whom she lived,
and was such as she had always been accustomed to hear; but her
thoughts were deep and pure, her "peace flowed like a river," and
her communion with God lifted her to companionship with the
noblest and best of earth. Though I spent but little more than an hour
in her presence, and many years have passed since that transient
meeting, her picture still hangs in the chamber of my memory, calm,
pure, and saintly, and breathing upon my spirit a perpetual
benediction.
CHAPTER V.
OLD-TIME BASKET-MEETINGS IN THE BRUSH.
Religious meetings, popularly denominated "basket-meetings,"
were known and recognized as established institutions in the Brush.
They were among the assemblages that had resulted from the
sparseness of the population in those regions. Where the country
was hilly and mountainous, and the settlers were scattered along the
streams in the narrow valleys; or the land was so rough and poor
that only occasional patches would reward tillage; or for various
other causes, the families were but few, and far distant from each
other, it was a very difficult matter for the people to leave their homes
day after day to attend a continuous meeting. Hence, among other
religious gatherings, they had long been accustomed to hold what
were called basket-meetings.
These meetings involved less labor and trouble than camp-meetings,
and could often be held where such a meeting would be impossible.
They were usually not as large, and did not continue as many days.
They were called "basket-meetings" from the fact that those from a
distance brought their provisions, already cooked, in large baskets,
and in quantities sufficient to last them during the continuance of the
meeting. They put up no tents or cabins on the ground. They did not
cook or sleep there. They most frequently commenced on Saturday,
and continued through the Sabbath. They generally had a prayer-
meeting and preaching on Saturday forenoon, and then adjourned
for an hour or two. During this intermission the greater part of the
people dispersed in groups among the trees, and took their dinner
after the manner of a picnic. Those living in the immediate vicinity
returned to their homes for dinner, taking with them as many of those
in attendance as they could possibly secure. Every stranger was
sure of repeated invitations to dine, both with these families and
neighborhood groups among the trees, and at the adjacent cabins.
After dinner they reassembled and had a repetition of the services of
the morning.
Unlike a camp-meeting, they had no services at night. When the
afternoon meetings were concluded, the people dispersed and spent
the night at the cabins within two or three miles around. All the
people in these cabins usually kept open house upon such an
occasion. They were present, and, after the benediction was
pronounced, they mounted the stumps and logs and extended a
general invitation to any present to spend the night with them. Not
satisfied with giving this general invitation, they jumped down and
went among the rapidly dispersing crowd and followed it with private
personal solicitations to accept their proffered hospitality.
On the Sabbath, they reassembled with augmented numbers, and
the services of Saturday were reënacted, with such additions and
variations as the circumstances might demand.
The first basket-meeting that I ever attended was so new and
strange to me in all its incidents, that, though many years have
intervened, my recollections of it are as vivid as though it had
occurred but yesterday. It was in a very rough, wild region. The
country had been settled a long time, so that those in attendance
were genuine backwoods people "to the manner born." The place of
meeting was in a tall, dense, unbroken forest. The underbrush had
been cut and cleared away, a few trees had been so felled that rude
planks, made by splitting logs, could be placed across them for seats
for the ladies, while the men mostly sat upon the trunks of other
fallen trees. The pulpit or "stand" for the preacher was original and
truly Gothic in its construction. It was made by cutting horizontal
notches immediately opposite to each other, in the sides of two large
oak-trees, standing about four feet apart, and inserting into these
notches a board about a foot wide, that had been placed across a
wagon and used for a seat by some of those present in coming to
the meeting. The preacher placed his Bible and hymn-book upon this
board, hung the indispensable saddle-bags in which he had brought
them across one end of it, and so was ready for the services. I
thought I had never seen in any cathedral a pulpit more simple and
grand. Those towering, grand old oaks, with their massive,
outstretching branches, spoke eloquently of the power and grandeur
of the God who made them. And yet, small and puny as the preacher
appeared in the contrast, it was a fitting place for him to stand and
proclaim his message to the people who worshiped beneath them.
Comparatively unlearned and ignorant as he was, he could tell them
from that open Bible what they would never learn in the
contemplation of grand old forests, or stars, or suns, or all the
sublimest works of nature. All these are mute and dumb in regard to
the story of the cross. However they may enkindle our rapture, or
excite our reverence, they will never tell us how sin may be forgiven
—how the soul may be saved.
The indispensable matter in the selection of grounds for a basket-
meeting or a camp-meeting in the Southwest was a good spring of
clear, running water. This must be so large as to furnish an
abundance of water, not only for all the people who would be
present, but for all the horses necessary to transport themselves and
their provisions to the place of meeting. In hot weather the demands
for water were large, and there was need for a "clear spring" like that
so beautifully described by the poet Bryant:
"... yon clear spring, that, midst its herbs,
Wells softly forth, and wandering, steeps the roots
Of half the mighty forest."
The sermon on this occasion was plain, sensible, and earnest. The
preacher was superior to the people, and yet in all respects one of
them. He had been born in the Brush, raised in the Brush, and had
spent many years in preaching to the people in the Brush. He
dressed as they dressed, talked as they talked, and, unconsciously
to himself, used all their provincialisms in his sermons. In his
thoughts, feelings, and manner of life he was in full sympathy with
them. He had toiled among them long, earnestly, and successfully.
He had preached to a great many congregations, scattered over a
wide extent of Brush country. He had been associated with his
brethren of different denominations in holding a great many union
basket-meetings similar to the one now in progress. He was widely
known, beloved, and honored. Perhaps the most widely known,
honored, and successful pastorate in the country has been that of
the late Rev. Dr. Gardner Spring, in New York. But I do not think that
Dr. Spring, with all his talents, culture, and learning, could possibly
have been as useful, as successful, as honored among these
people, as was this preacher. He could not have eaten their coarse
food, slept in their wretched beds, mingled with them in their daily
life, or been in such complete sympathy with them in their poverty,
struggles, temptations, and modes of thought, as to have so won
their love and reverence, and led them in such numbers to the cross
of Christ. "There are diversity of gifts, but the same spirit," etc. I
honor these noble and heroic workers in the Master's vineyard, who
thus toil on in the Brush, through scores of years, all unknown to
fame. Many of them know nothing of Latin, Greek, and Hebrew, but
they know how to win souls to Christ, and the highest authority has
said, "He that winneth souls is wise."
That congregation, when assembled, seated, and engaged in their
devotions, presented a scene not to be forgotten. The preacher,
small in stature, stood upon a rude platform at the feet of the
massive columns of his pulpit. The people were seated among the
standing trees, upon seats arranged without any of the usual
regularity and order, but lying at all points of the compass just as
they had been able to fall, the smaller trees among the larger ones.
The voice of prayer and song ascended amid those massive,
towering columns, crowned with arches formed by their outstretching
branches, and covered with dense foliage. It was the worship of God
in his own temple. It carried the thoughts back to many scenes not
unlike it, in the lives and labors of Christ and his apostles, when they
preached and taught upon the Mount of Olives, by the shores of
Gennesaret, and over the hills and valleys of Palestine. It gave new
force and beauty to the familiar words of Bryant's grand and noble
"Forest Hymn:"
"The groves were God's first temples, ere man learned
To hew the shaft and lay the architrave,
And spread the roof above them—ere he framed
The lofty vault, to gather and roll back
The sound of anthems; in the darkling wood,
Amid the cool and silence, he knelt down,
And offered to the Mightiest solemn thanks
And supplication....
... Be it ours to meditate,
In these calm shades, thy milder majesty,
And to the beautiful order of thy works
Learn to conform the order of our lives."
At the conclusion of the morning sermon the greater part of the
congregation dispersed among the trees to take their dinner in the
manner I have already described. I was invited to go with the
preacher to a cabin about a mile distant, where we were to have our
home during the meeting. We mounted our horses and accompanied
our host through the woods to his residence. As I looked back, I saw
that we were followed by some forty or more other guests. On
reaching his home I found three buildings—a log-house, log-kitchen,
and log-stable. Our horses were put in the stable and bountifully fed
with corn in the ear and fodder. "Fodder" in these regions has a
limited signification, and is applied only to the leaves which are
stripped from the corn-stalks, tied in small bundles, and generally
stacked for preservation. The stalks are not cut, as in the North and
East, but the leaves are stripped from them while standing. This is
the usual feed for horses in the place of hay.
The house was similar to all log-houses, but, as our company was so
numerous, I had the curiosity to ask our host how large it was, and
he told me that he cut the logs just twenty feet long. Its single room
was, therefore, less than twenty feet square. We, however, received
a warm and cordial welcome, and host, hostess, and guests seemed
exceedingly happy. With a part of the company, I was soon invited
into the adjoining house to dinner. This was much smaller—not more
than ten or fifteen feet square. A loom in one corner filled a large part
of the room. This was a very important part of their household
treasures, as the greater portion of the clothing of the entire family
was woven upon it. A long, narrow table, of home construction,
occupied the space between the foot of the loom and the wall. There
was a large fireplace in front, before which the coffee was smoking.
A chair at each end and a bench on each side of the table furnished
seats for ten guests. Our bill of fare was cold barbecued shoat,
sweet potatoes roasted in the ashes, bread, honey, and coffee. Our
honey was from a "bee tree," and our bread was of the Graham
variety, from the necessities of the case. The wheat had been
ground at a "horse mill" in the neighborhood, where they had no
arrangements for separating the bran from the flour. Such a dinner
was not to be despised by hungry men. By the way, I have found that
over a very wide extent of our country the men, on such occasions,
always eat first and alone, the women meanwhile standing around
the table and waiting upon them. After we had finished our dinner,
the table was rapidly reset by the aid of the "sisters" present, and ten
more guests took their seats and dined. The same course was
repeated until the table was set five times, and fifty persons had
dined bountifully in that little log-cabin.
Having all dined, we returned to the preaching "stand," and the
congregation reassembled. I preached to them at 4 p.m., and all the
services were conducted to the close in a manner not essentially
different from preaching services elsewhere.
The audience was dismissed for the night, and dispersed among the
nearest cabins. My clerical friend and myself were joined by a young
licentiate, and returned to spend the night at the house at which we
had dined. The company was not as large as that at dinner, but to
one inexperienced in such life, as I then was, it was beyond my
comprehension how they could be entertained for the night. My
experience and observation at dinner had shown me how we could
get through with our supper. A succession of tables I understood, but
how could that be applied to sleeping arrangements? A succession
of beds was a kind of "succession" I had never heard or read of in
ecclesiastical or any other history. But my perplexities were evidently
not felt by any one else in the company, and I dismissed them.
All seemed as happy as they could well be. Conversation was
animated. All tongues were loosed. There were stories of former
basket and other meetings, of wonderful revivals, and of remarkable
conversions. There were reminiscences of eccentric and favorite
preachers who had labored among them long years before. There
was the greatest variety of real Western and Southwestern religious
melodies and songs. These were interspersed with the conversation
during the evening, and were the source of great and unfailing
interest and joy. So the hours rolled on, and all were happy. It was
the occasion to which they had looked forward, and for which they
had planned for months—the great occasion of all the year, and it
brought no disappointment. For myself, I must say that if I ever drew
upon my stores of anecdote, and whatever powers of entertaining I
may possess, it was upon this occasion. I was quite in sympathy with
the general joy and good feeling. During the evening one and
another had called for the singing of different religious songs that
were their favorites. On such occasions there was a general appeal
to a young lady, who was quite the best singer in the company, to
know if she knew the song called for; and if she did it was sung. At
length a hymn was called for, and in response to the usual appeal
she said she did not know it. I opened a book, found the hymn and
tune, handed it to her, and said, "Here is the hymn with the tune.
Perhaps you can sing it."
She declined to take the book, saying, with the utmost frankness,
"Oh! sir, I can't read."
I now learned to my amazement that all the hymns and tunes she
had sung that evening she had learned by rote—learned by hearing
them sung by others. She was a young lady, some eighteen or
twenty years old, of more than common beauty of face and form, and
yet she had no hesitation at all in revealing the fact that she could
not read. I afterward received a similar shock on remarking to a
young lady that I met at a county-seat, whose home I had previously
visited, "I understand that a number of the young ladies in your
neighborhood can not read."
"Oh!" said she, "there are only two young ladies there that can read."
I afterward visited many neighborhoods where it was as proper to
ask a young lady if she could read as it was to ask for a drink of
water, the time of day, or any other question.
At length the evening passed, and the hour for rest and sleep came.
One of our number "took the books" and led our evening devotions.
A chapter was read, our final hymn was sung, and we all bowed in
prayer around that family altar. As we arose from our knees, the
brethren present all walked out of doors. The sisters remained
within. Some "Martha" among them had enumerated our company.
There were three beds in the cabin. These were divided, and a
sufficient number of beds made up on the bedsteads and over the
cabin-floor to furnish a sleeping-place for all our company. This
accomplished, some signal—I know not what—was given, and the
brethren returned to the house. I followed them. The sisters were all
in bed, upon the bedsteads, with their heads covered up by the
blankets. We got into our beds as though these blankets had been
thick walls. Our numbers in this room included three young ladies, a
man and his wife and child, and six other men.
When we awoke in the morning some of the brethren engaged in
conversation for a time, until Mr. W——, the preacher, remarked, "I
suppose it is time to think about getting up."
At this signal the sisters covered their heads again with their
blankets, and we arose, dressed, and departed. My companion for
the night was the young licentiate; and as we walked toward the
stable to look after our horses—the first thing usually done in the
morning by persons journeying on horseback—I remarked to him,
"Last night has been something new in my experience. I never slept
in that way before."
He looked at me with an expression of the profoundest
astonishment, and exclaimed, "You haven't!"
I said no more. I saw that I was the verdant one. I was the only one
in all the company to whom the experiences of the night suggested a
thought of anything unusual or strange. So trite and true it is that
"one half of the world does not know how the other half lives."
The Sabbath was the "great day of the feast." It brought together
some three or four hundred people—a very large congregation in
such a sparsely settled country. I made an address to them in the
morning, explaining the extended operations of the American Bible
Society in our own and other lands. I told them that the Society was
then attempting to place a copy of the Word of God in every family in
our country; that Mr. K——, a venerable and honored class-leader,
had been appointed to canvass their county; and that either by sale
or gift he would supply every family in the county with the Bible that
would receive it. All of these facts were new to the most of them, and
were listened to with the greatest interest. Large numbers of them
had no Bibles in their families; they were more than sixty miles from
a book-store, which many of them never visited, and they were glad
to have the Bible brought to their own doors, and furnished to them
at so small a price. By making these statements I gave the Bible-
distributor an introduction to the people scattered over a wide extent
of country, which prepared them to welcome him to their families and
greatly facilitated his labors.
My brief address was followed by a sermon entirely different from
those of the preacher I have already described, and deserves notice
as a type of thousands that are preached to the people in the Brush.
Scarcely a sentence in the sermon was uttered in the usual method
of speech. It was drawled out in a sing-song tone from the beginning
to the end. The preacher ran his voice up, and sustained it at so high
a pitch that he could make but little variation of voice upward. The air
in his lungs would become exhausted, and at the conclusion of every
sentence he would "catch" his breath with an "ah." As he proceeded
with his sermon, and his vocal organs became wearied with this
most unnatural exertion, the "ah" was repeated more and more
frequently, until, with the most painful contortions of face and form,
he would with difficulty articulate, in his sing-song tone:
"Oh, my beloved brethren—ah, and sisters—ah, you have all got to
die—ah, and be buried—ah, and go to the judgment—ah, and stand
before the great white throne—ah, and receive your rewards—ah, for
the deeds—ah, done in the body—ah."
From the beginning to the end of his sermon, which occupied just an
hour and ten minutes by my watch, I could not see the slightest
evidence that he had any idea what he was going to say from one
sentence to another. While "catching his breath," and saying "ah," he
seemed to determine what he would say next. There was no more
train of thought or connection of ideas than in the harangue of a
maniac. And yet many hundreds of such sermons are preached in
the Brush, and I am sorry to add that thousands of the people had
rather hear these sermons than any others. This "holy tone" has
charms for them not possessed by any possible eloquence. As the
preacher "warms up" and becomes more animated in the progress of
his discourse, the more impressible sisters begin to move their
heads and bodies, and soon all the devout brethren and sisters sway
their bodies back and forth in perfect unison, keeping time, in some
mysterious manner, to his sing-song tone.
It seemed sad to me that such a congregation, gathered from such
long distances, should have the morning hour occupied with such a
sermon. But it was a union meeting, the preacher was the
representative of his denomination, and they would have gone away
worse than disappointed—grievously outraged—if they could not
have heard this sermon with the "holy tone."
But our basket-meeting was to be signalized by an incident always
interesting in all countries, in all grades of society, among the most
rustic as well as among the most refined. After the benediction, a
part of the congregation who were in the secret remained upon their
seats, casting knowing and pleasant glances at each other. My friend
W——, who, like a good many other preachers, and some
preachers' wives, had faithfully kept a secret that a good many were
"just dying to know," took his position in front of the "stand." A
trembling, blushing, but happy pair advanced from the crowd, and
took their position before him. The groom produced from his pocket
the indispensable license. The dispersing crowd, having by some
electric influence been apprised of what was going on, came rushing
back, and mounted the surrounding stumps and logs, forming a
standing background to the sitting circle. All looked on and listened in
silence, while the preacher in a strong, clear voice proceeded to
solemnize the marriage and pronounce them husband and wife. The
scene was strange and strikingly impressive. It seemed a wedding in
Nature's own cathedral. The day was perfect. Some rays from the
sun penetrated the dense foliage above and fell upon the scene,
mingling golden hues with the shadows, as the poet, the recently
deceased A.B. Street, has so beautifully described:
"Here showers the sun in golden dots,
Here rests the shade in ebon spots,
So blended that the very air
Seems network as I enter here."
After the usual congratulations and kisses the groom withdrew, and
reappeared in a few moments mounted upon a large gray horse. The
bride, having gained the top of a stump, mounted his horse behind
him, and the two rode away, as happy and satisfied as they could
well be.
The larger congregation of the Sabbath made larger demands upon
their hospitality; but these demands were fully met. The dinner, both
under the trees and at the cabins, was but a reënactment of the
scenes of the day before on an enlarged scale.
In the afternoon Mr. W—— preached a sensible and earnest
sermon, like that of the day before. In my pocket-diary, written at the
time, I have characterized it as a "thundering sermon." His voice was
strong, and capable of reaching the largest congregations that he
addressed in the open air. This sermon concluded the services of the
basket-meeting. As the benediction was pronounced, three
gentlemen on horseback arrived upon the ground. They were a
presiding elder, a circuit-rider, and a class-leader, on their way to
conference. They had preached some fifteen miles away in the
morning, and continued their journey to reach this meeting. I knew
them all, and had preached with and for them at their homes. As
they were strangers to most, if not all, the people, I introduced them
to the clergymen and others present. They were some twenty miles
from any hotel or public-house, and of course must spend the night
with some of these people. My host, to whom I had introduced them,
said:
"I should be very glad to have you all stay with me, but I can't take
care of your horses. I have a plenty of houseroom, but my stable is
full."
From what I have already said of the numbers who dined and lodged
with him, it will be seen that he had very enlarged ideas of the
capacity of his house. An enthusiastic neighbor, who was about as
rough a looking specimen of a backwoodsman as I ever saw,
stepped forward and said:
"I have room enough for your horses and you too. I should be glad to
have you all go with me."
The presiding elder went with him, but the preacher and the class-
leader were claimed by others.
Before leaving the grounds, it was arranged between us that we
should all meet at a designated place in the morning, and I would
travel with them to the conference, to which I was thus far on my
way. Though not an Arminian, but a Calvinist, though not a
Methodist, but a Presbyterian, I knew that a cordial welcome awaited
me as a representative of the American Bible Society. I knew that, in
addition to this official welcome, I should receive the warm greetings
of brethren beloved, with whom I had traveled many hundreds of
miles over their "circuits," and mingled in all the novel, interesting,
and eventful scenes in their wild itinerant life. When I met the elder
the next morning, I asked him the nature of the very ample
accommodations that were offered him. He said he slept upon the
floor, but he did not undertake to count the number who shared it
with him.
So ended the various incidents of our basket-meeting; but the
recollection of it has been among the pleasant memories of my life in
the Brush.
SOME EXPLANATORY WORDS.
Perhaps some statement in explanation of this "rough" but
abounding hospitality of the people in the Brush is demanded in
justice to those persons and places whose hospitality would seem to
suffer in the contrast. I might enumerate many circumstances
connected with life in a wild, unsettled country that will occur to most
readers as the cause of this abounding hospitality; but it seems to
me that the chief reason is the fact that meat, bread, and all their
provisions, excepting groceries, cost them so very little. They
estimate what they can use scarcely more than the water taken from
their springs. Beef, pork, and bread cost them almost nothing. Their
cattle run at large, and their free range includes thousands of acres
of unoccupied lands. They grow and increase in this manner with but
little attention or care. The hogs find their food in the woods the
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like