100% found this document useful (5 votes)
108 views

Data Structures with C Programming 2nd Edition Anil Kumar Yadav All Chapters Instant Download

Yadav

Uploaded by

masihfaynei8
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
108 views

Data Structures with C Programming 2nd Edition Anil Kumar Yadav All Chapters Instant Download

Yadav

Uploaded by

masihfaynei8
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Data Structures with C Programming 2nd Edition


Anil Kumar Yadav

https://textbookfull.com/product/data-structures-with-c-
programming-2nd-edition-anil-kumar-yadav/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


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

C++ Programming. Program Design including Data Structures


D.S. Malik

https://textbookfull.com/product/c-programming-program-design-
including-data-structures-d-s-malik/

textboxfull.com

Effective Robotics Programming with ROS Anil Mahtani

https://textbookfull.com/product/effective-robotics-programming-with-
ros-anil-mahtani/

textboxfull.com

Interpreting LISP: Programming and Data Structures 2nd


Edition Gary D. Knott (Auth.)

https://textbookfull.com/product/interpreting-lisp-programming-and-
data-structures-2nd-edition-gary-d-knott-auth/

textboxfull.com

Problem Solving in Data Structures Algorithms Using C


Programming Interview Guide First Edition Hemant Jain

https://textbookfull.com/product/problem-solving-in-data-structures-
algorithms-using-c-programming-interview-guide-first-edition-hemant-
jain/
textboxfull.com
Problem Solving in Data Structures Algorithms Using C
Programming Interview Guide 1st Edition Hemant Jain

https://textbookfull.com/product/problem-solving-in-data-structures-
algorithms-using-c-programming-interview-guide-1st-edition-hemant-
jain/
textboxfull.com

Mathematical programming with data perturbations II 2nd


Edition Fiacco.

https://textbookfull.com/product/mathematical-programming-with-data-
perturbations-ii-2nd-edition-fiacco/

textboxfull.com

Data Structures Using C 2nd edition Reema Thareja Oxford


Publication 2014 Reema Thareja

https://textbookfull.com/product/data-structures-using-c-2nd-edition-
reema-thareja-oxford-publication-2014-reema-thareja/

textboxfull.com

Interpreting LISP. Programming and Data Structures Gary D.


Knott

https://textbookfull.com/product/interpreting-lisp-programming-and-
data-structures-gary-d-knott/

textboxfull.com

Data Structures and Algorithms with the C++ STL: A guide


for modern C++ practitioners 1 / converted Edition John
Farrier
https://textbookfull.com/product/data-structures-and-algorithms-with-
the-c-stl-a-guide-for-modern-c-practitioners-1-converted-edition-john-
farrier/
textboxfull.com
DATA STRUCTURES WITH C
PROGRAMMING
DATA STRUCTURES WITH C
PROGRAMMING

Dr. Anil Kumar Yadav and Vinod Kumar Yadav

ARCLER
P r e s s

www.arclerpress.com
Data Structures with C Programming
Dr. Anil Kumar Yadav and Vinod Kumar Yadav

Arcler Press
2010 Winston Park Drive,
2nd Floor
Oakville, ON L6H 5R7
Canada
www.arclerpress.com
Tel: 001-289-291-7705
        001-905-616-2116
Fax: 001-289-291-7601
Email: [email protected]

e-book Edition 2019

ISBN: 978-1-77361-658-2 (e-book)

This book contains information obtained from highly regarded resources. Reprinted material
sources are indicated and copyright remains with the original owners. Copyright for images and
other graphics remains with the original owners as indicated. A Wide variety of references are
listed. Reasonable efforts have been made to publish reliable data. Authors or Editors or Publish-
ers are not responsible for the accuracy of the information in the published chapters or conse-
quences of their use. The publisher assumes no responsibility for any damage or grievance to the
persons or property arising out of the use of any materials, instructions, methods or thoughts in
the book. The authors or editors and the publisher have attempted to trace the copyright holders
of all material reproduced in this publication and apologize to copyright holders if permission has
not been obtained. If any copyright holder has not been acknowledged, please write to us so we
may rectify.

Notice: Registered trademark of products or corporate names are used only for explanation and
identification without intent of infringement.

© 2019 Arcler Press

ISBN: 978-1-77361-337-6 (Hardcover)

Arcler Press publishes wide variety of books and eBooks. For more information about
Arcler Press and its products, visit our website at www.arclerpress.com
ABOUT THE AUTHORS

Dr. Anil Kumar Yadav has done his B.Tech (CSE), M.Tech (I.T)
and PhD (Computer Science and Engineering) in the area of Machine
Learning specialization in Reinforcement Learning and Artificial
Intelligence. He has filed patent on topic Machine Learning, “Method
for Reinforcement Learning,”. He has been teaching data structures and
Artificial intelligence over the last 13 years at under graduate and post
graduate levels. With over a decade of teaching experience in the
engineering institutions, he has exemplified his work at various
designations. His research interests include data structures, deep
learning , machine learning algorithms specially reinforcement
learning, computational intelligence, computer vision and image
processing, brain computer/machine interface, intelligent informatics, soft-
computing in modeling and control, cognitive science. He has presented
papers at national and international conferences and published several
papers in international journals and also attended several workshops. He is
also a reviewer of some of the international journal and conferences.
Vinod Kumar Yadav has done his B.Tech (I.T), M.Tech (CSE). His area
of interest is Data mining, Artificial Intelligence and Machine Learning. He
has been teaching data structures over the last 7 years at under graduate and
post graduate levels. He is also GATE Qualified in Information Technology
in 2007. He has published many papers at national, international conferences
and international Journals. He also attended several national workshops.
TABLE OF CONTENTS

List of Figures.................................................................................................xi
Preface.................................................................................................... ....xvii

Chapter 1 Data Structures.......................................................................................... 1


1.1. Introduction......................................................................................... 2
1.2. Data Structure Basic Terminology........................................................ 2
1.3. Data Structure...................................................................................... 3
1.4. Introduction To Algorithm.................................................................... 8
1.5. Basic Concept of Function................................................................. 13
1.6. Basic Concept of Pointers.................................................................. 19
1.7. Introduction To Structure.................................................................... 22
1.8. Dynamic Memory Allocation In Data Structure................................. 28

Chapter 2 Array........................................................................................................ 35
2.1. Introduction....................................................................................... 36
2.2. Application of Array........................................................................... 36
2.3. Definition of Array............................................................................. 37
2.4. Representation of Array...................................................................... 37
2.5. Ordered List....................................................................................... 56
2.6. Sparse Matrices.................................................................................. 57
2.7. Garbage Collection............................................................................ 60

Chapter 3 Recursion................................................................................................. 63
3.1. Introduction....................................................................................... 64
3.2. Recursion.......................................................................................... 64
3.3. Tower of Hanoi ................................................................................. 72
3.4. Backtracking ..................................................................................... 74
Chapter 4 Stack........................................................................................................ 77
4.1. Introduction....................................................................................... 78
4.2. Definition of Stack............................................................................. 78
4.3. Operations on Stack.......................................................................... 80
4.4. Disadvantages of Stack...................................................................... 94
4.5. Applications of Stack......................................................................... 94
4.6. Expressions (Polish Notation)............................................................. 95
4.7. Evaluation of Postfix Expression......................................................... 98
4.8. Decimal To Binary Conversion........................................................... 99
4.9. Reversing The String......................................................................... 102

Chapter 5 Queue.................................................................................................... 105


5.1. Introduction..................................................................................... 106
5.2. Definition And Structure of Queue.................................................. 106
5.3. Operations on Queue...................................................................... 106
5.4. Circular Queue................................................................................ 114
5.5. D-Queue (Double Ended Queue).................................................... 119
5.6. Priority Queues................................................................................ 124
5.7. Application of Queue...................................................................... 128

Chapter 6 Linked List.............................................................................................. 129


6.1. Introduction..................................................................................... 130
6.2. Definition And Structure of Linked List............................................ 130
6.3. Characteristics of Linked List............................................................ 134
6.4. Types of Linked List.......................................................................... 135
6.5 Polynomial Representation of Linked List.......................................... 158

Chapter 7 Tree........................................................................................................ 161


7.1. Introduction..................................................................................... 162
7.2. Definition of Trees........................................................................... 162
7.3. Binary Tree...................................................................................... 165
7.4. Binary Tree Representation.............................................................. 169
7.5. Binary Tree Traversal........................................................................ 172
7.6. Binary Search Tree (BST).................................................................. 179
7.7. Height Balanced (AVL) Tree............................................................. 196

viii
Chapter 8 Graph..................................................................................................... 213
8.1. Introduction..................................................................................... 214
8.2. Definition of Graph......................................................................... 214
8.3. Representation of Graphs................................................................. 221
8.4. Graph Traversal................................................................................ 224
8.5. Spanning Tree.................................................................................. 229
8.6. Shortest Path Problem...................................................................... 240
8.7. Application Of Graph...................................................................... 243

Chapter 9 Sorting.................................................................................................... 245


9.1. Introduction..................................................................................... 246
9.2. Types of Sorting............................................................................... 246
9.3. Basic Terms of Sorting...................................................................... 246
9.4. Sorting Techniques........................................................................... 247

Chapter 10 Searching and Hashing........................................................................... 291


10.1. Introduction................................................................................... 292
10.2. Searching ...................................................................................... 292
10.3. Hashing......................................................................................... 296
10.4. Collision........................................................................................ 300
10.5. Collision Handling Method ........................................................... 301
10.6. Rehashing...................................................................................... 306
10.7. Application of Hashing.................................................................. 307

Index...................................................................................................... 309

ix
LIST OF FIGURES

Figure 1.1 Part of abstract data type.


Figure 1.2 Classification of data structures.
Figure 1.3 One-dimensional array.
Figure 1.4 Stack data structure
Figure 1.5 Queue structure.
Figure 1.6 Representation of link list.
Figure 1.7 Tree data structure.
Figure 1.8 A graph.
Figure 1.9 Big O notation.
Figure 1.10 Ω Notation.
Figure 1.11 ‘Ө’ Notation
Figure 1.12 Output a user-defined function.
Figure 1.13 Classification of function argument.
Figure 1.14 Output Call by Value to Pass Arguments.
Figure 1.15 Output of Call by Reference to Pass Arguments.
Figure 1.16 Output of Accessing variable through Pointers.
Figure 1.17 Output of Null Pointers.
Figure 1.18 Output of Structure Initialization.
Figure 1.19 Output structure pointer
Figure 1.20 Output of an Array of Structure.
Figure 1.21 Output of malloc and free function.
Figure 1.22 Output of calloc and free function.
Figure 1.23 Output of realloc Function.
Figure 2.1 One-dimensional Array.
Figure 2.2 Array initialization and accessing.
Figure 2.3 Output of Program Greater Number.

xi
Figure 2.4 Output of Program 2.3.
Figure 2.5 Array positions.
Figure 2.6 3 x 4 array two-dimensional.
Figure 2.7 Row major store in an array.
Figure 2.8 Column major store in an array.
Figure 2.9 Output of Program 2.4.
Figure 2.10 Output of Program 2.5
Figure 2.11 Output of Searching.
Figure 2.12 Output of Program Insertion.
Figure 2.13 Output of Program Deletion.
Figure 2.14 Output of Program Deletion.
Figure 2.15 Polynomial representation.
Figure 2.16 Sparse matrix.
Figure 2.17 Output of Sparse Matrix or not.
Figure 3.1 Output of a Factorial number Using Iteration Method.
Figure 3.2 Output of a Factorial number Using Recursion Method.
Figure 3.3 Output of Fibonacci Series.
Figure 3.4 Output for Check Prime number.
Figure 3.5 Initial Setup of Tower of Hanoi
Figure 3.6 After applying first Step position of Tower
Figure 3.7 After applying second step position of tower
Figure 3.8 After applying third step position of tower.
Figure 3.9 After applying fourth step position of tower.
Figure 3.10 Tree Example.
Figure 4.1 Stack Containing Items.
Figure 4.2 Stack using a 1-dimensional array.
Figure 4.3 Stack empty condition
Figure 4.4 Stack full condition.
Figure 4.5 Performing Push Operation.
Figure 4.6 Performing Pop Operation.
Figure 4.7 Stack Operation.

xii
Figure 4.8 Output Example 4.1.
Figure 4.9 Output of stack operation using linked list.
Figure 4.10 Output of Decimal to Binary
Figure 4.11 Output Reverse a String.
Figure 5.1 Queue structure.
Figure 5.2 Array Implementation of Queue.
Figure 5.3 (a) Queue in Memory.
Figure 5.3 (b) Queue after deleting the first element.
Figure 5.3 (c) Queue after inserting an element.
Figure 5.4 Output of Queue Operations.
Figure 5.5 Output of Queue operation using Linked List.
Figure 5.6 Linear Queue.
Figure 5.7 Circular Queue.
Figure 5.8 Output of Circular Queue Operations
Figure 5.9 D-Queue.
Figure 5.10 (a) Input-restricted D-queue.
Figure 5.10 (b) Output-restricted D-queue.
Figure 5.11 Output of D-Queue Operations.
Figure 5.12 Output of Priority Queue.
Figure 6.1 Structure of a Node
Figure 6.2 Representation of link list.
Figure 6.3 Output of Linked List.
Figure 6.4 A singly-linked list containing three integer values.
Figure 6.5 Output of Single linked list operations.
Figure 6.6 Output of Circular Linked List Operations.
Figure 6.7 Doubly Linked List.
Figure 6.8 Output of Doubly linked list Operations.
Figure 6.9 Structure of a polynomial node.
Figure 6.10 List structure of polynomial.
Figure 6.11 Linked representation of a polynomial two variable.
Figure 7.1 Tree.
Figure 7.2 a, b and c represent a forest.

xiii
Figure 7.3 An example of Tree.
Figure 7.4 Binary tree.
Figure 7.5 Strictly Binary Tree
Figure 7.6 Almost Complete.
Figure 7.7 Complete Binary Tree.
Figure 7.8 Extended Binary Tree.
Figure 7.9 (a) Left -skewed binary tree (b) Right – skewed binary tree.
Figure 7.10 General Tree.
Figure 7.11 Expression Tree.
Figure 7.12 Sequential representation of a binary tree.
Figure 7.13 Structure of a node binary tree.
Figure 7.14 Linked List Representation.
Figure 7.15 Binary Tree (a) and (b).
Figure 7.16 Binary Tree (a) and (b).
Figure 7.17 Binary Tree (a) and (b).
Figure 7.18 Finally Binary Tree.
Figure 7.19 Computing pointer in a binary tree.
Figure 7.20 A threaded binary tree.
Figure 7.21 Binary Search Tree.
Figure 7.22 Binary Search Tree.
Figure 7.23 Before deletion.
Figure 7.24 After deletion.
Figure 7.25 Before deletion.
Figure 7.26 After deletion of a node from the tree.
Figure 7.27 Before deletion.
Figure 7.28 After the deletion of a node from the tree.
Figure 7.29 Red-Black Tree.
Figure 7.30 AVL tree.
Figure 7.31 Not an AVL tree.
Figure 7.32 Classification of Rotation.
Figure 7.33 Balanced AVL search tree.
Figure 7.34 AVL search tree after performing LL rotation.

xiv
Figure 7.35 Balanced AVL search tree.
Figure 7.36 AVL search tree after performing RR rotation
Figure 7.37 Balanced AVL search tree.
Figure 7.38 AVL search tree after performing LR rotation.
Figure 7.39 Balanced AVL search tree.
Figure 7.40 AVL search tree after performing RL rotation.
Figure 7.41 AVL tree Exercise of 7.4
Figure 7.42 Weight Balance Tree.
Figure 8.1 Simple Graph.
Figure 8.2 A Directed Graph.
Figure 8.3 An Undirected Graph.
Figure 8.4 A Complete Graph.
Figure 8.5 A Sub Graph.
Figure 8.6 A connected graph.
Figure 8.7 A Multigraph.
Figure 8.8 A Graph with four Vertices.
Figure 8.9 A directed graph with four Vertices.
Figure 8.10 A Null Graph.
Figure 8.11 An Isomorphic Graph.
Figure 8.12 A Homeomorphic Graph.
Figure 8.13 An Undirected Graph.
Figure 8.14 A Directed Graph.
Figure 8.15 Linked list representation of Figure 8.14.
Figure 8.16 An Undirected Graph.
Figure 8.17 Linked list of Figure 8.16.
Figure 8.18 Graph with six vertices.
Figure 8.19 An undirected graph.
Figure 8.20 An undirected graph.
Figure 8.21 An undirected graph.
Figure 8.22(a) Undirected Graph.
Figure 8.22(b) Spanning Tree.
Figure 8.23 Undirected Graph.

xv
Figure 8.24 Minimum spanning tree Graph of 8.23.
Figure 8.25 Undirected Graph G.
Figure 8.26 A Minimum Spanning tree of Figure 8.25.
Figure 8.27 Undirected Graph G.
Figure 8.28 Undirected Graph G.
Figure 8.29 A Minimum Spanning tree of Figure 8.27
Figure 8.30 Unweighted graph
Figure 8.31 A Graph.
Figure 9.1 Output of Bubble Sort.
Figure 9.2 Output of Insertion Sort.
Figure 9.3 Output of Selection Sort.
Figure 9.4 Output of Merge Sort element.
Figure 9.5 Output of merge sort for two unsorted list.
Figure 9.6 Quick Sort.
Figure 9.7 Output of Quick Sort element.
Figure 9.8 Output of Heap Sort.
Figure 9.9 Output of Radix sort elements.
Figure 10.1 Output for Binary search.
Figure 10.2 A small phone directory book as a hash table.
Figure 10.3 Chaining.
Figure 10.4 Rehashing.

xvi
PREFACE

The significant role of Data Structures is famous for Computer Science and
Engineering. This book is about the structure, actions and the principle of a
different data type that help improve the ability to write an efficient algorithm,
program and Analysis algorithm and program complexity. In this book, we
present the fundamental concepts, operations, and algorithms for different types
of data structures. This makes an understanding of this subject more lucid and
makes it more interesting. This book, intended for the first course in the data
structure at the junior or senior undergraduate level.
This book prepared according to the syllabus of various Universities and
conceived as a textbook for the course of Bachelor of Engineering or Technology
of different branches of computer science. The contents of the book have been
thoroughly organized and spread over ten chapters. Each chapter begins with
the basics and describes with syntax, diagrams, and examples. Each concept
of data structure has implemented in the C programming language. The book
not only covers the scope of the subject but also explains the philosophy of the
subject.
We trust the textbook would meet the requirements of both the teachers and
the students. We would very much appreciate receiving any suggestions for
improvement in the book from teachers, students, and other readers.
We wish to express our deep thanks to all those who helped in making this book
a reality.
We express our gratitude to our publisher and the team of publications that have
taken great pains in publishing the book with speed and accuracy.
1
CHAPTER

DATA STRUCTURES

CONTENTS
1.1. Introduction......................................................................................... 2
1.2. Data Structure Basic Terminology........................................................ 2
1.3. Data Structure...................................................................................... 3
1.4. Introduction To Algorithm.................................................................... 8
1.5. Basic Concept of Function................................................................. 13
1.6. Basic Concept of Pointers.................................................................. 19
1.7. Introduction To Structure.................................................................... 22
1.8. Dynamic Memory Allocation In Data Structure................................. 28
2 Data Structures with C Programming

1.1. INTRODUCTION
In the Computer Programming or Software development, Data Structures is
one of the most valuable roles for computer engineers. Use of appropriate
data structures enables a computer system to perform its task more efficiently,
by influencing the ability of computers to store and retrieve data from any
location in its memory. A data structure is a method of how storing data on
a computer so that it can be used efficiently. In Computer Programming we
are using different types of data to perform, store, access and sent data and
information. Computers cannot do without data, so organizing that data is
very important. If that data is not organized effectively, it is very difficult to
perform any task on that data. If it is organized effectively then any operation
can be performed easily on that data.

1.2. DATA STRUCTURE BASIC TERMINOLOGY

1.2.1. Data and Data Types


Data are a group of specific facts, numbers, character, and figures. A data item
refers to a single unit of values. Data is an unprocessed form of information.
Data is plural and datum is singular form. Data items that are divided into
subitems are called group items; those are not called elementary items. For
examples, an employee’s name may divide into three subitems: first name,
middle and last name. Data is numerical, character, symbols or any other
kind of information. A Data Types consists of a set of values and a set of
operations. A data type is a name which refers to kinds of data that variables
may hold in the programming language. The data is stored in the memory
at some location. By using the name of the variable, one can access the data
from that memory location easily. For example in ‘C’ language, the data
types are int (integer value), float (decimal value), char (character), double
(real value of large range) etc. Data types divided into categories: Built-in
data types (Primitive Data) and User define data types (Non-primitive
Data). Generally, a programming language supports a set of built-in data
types and allow the user to define a new type those are called user-defined
data types.
Information: Information is related to an attribute or a set of attributes
of an object. Examples are the number of students in a class, length of the
room, and the component of a computer. The fundamental component of
information is the Data; “Information is a collection of data. When data
Data Structures 3

are processed or organized it gives meaningful and logical knowledge it


becomes information.”
Abstract Data Type: The abstract data type is a triple of D-Set of
domains, F-Set of functions, A-Axioms in which only what is to be done is
mentioned but how is to be done is not mentioned. At ADT, all the all the
implementation details are hidden.
In short: ADT = Type + Function Names + Behaviors of Each
function
An abstract data type can declare the data type and without explanation
operations to how it will be implemented. Applications that use the data type
are unaware of implementation; they only make use of the operations that
defined abstractly. If we want to change implementations, we have to do is
rewrite the operations. No matter how large our application is, the cost of
changing implementations is the same. The abstract data type is written with
the help of the instances and operations.
Implementation: The part that implements the abstract data type.
These two pieces are completely independent. It should be possible
to take the implementation developed for one application and use it for a
completely different application with no changes.

Figure 1.1: Part of abstract data type.

1.3. DATA STRUCTURE


Definition: The data structure can be defined as the organization of data
or elements and all possible operations, which are required for those set of
data. It is a logical or mathematical representation and organization of any
data is known as a data structure. Some of the data structures are arrays,
stacks, queues, linked lists, trees, and graphs, etc.
4 Data Structures with C Programming

“The well-organized collection of data and all feasible operations on


data is called a data structure.”
Data Structure = Organized data (mathematical or logical) + Accept-
able operations

1.3.1. Basic Operation of Data Structures


The following operations play a major role in data processing on data
structures:
• Traversing: Accessing each record exactly once so that certain
items in the record may be processed. This process is also called
visiting the record.
• Inserting: adding a new record to the structure.
• Deleting: Removing a record from the structure.
• Searching: Finding the location of record with a given key value,
or finding the locations of all records which satisfy one or more
conditions.
• Sorting: Arranging the records in some logical order.
• Merging: Combining the records in two different files into a
single file.

1.3.2. Classification of Data Structures

Figure 1.2: Classification of data structures.


The data structures are generally divided into two categories.
1. Primitive Data type: These are basic data that are directly
operated upon machine instructions. These have different
Data Structures 5

representations on different computers. Such as int, float, char,


double which are defined by programming language itself.
a) Integer Data Type: This type of data is used to store the
integer value in a variable. The value should not contain
any fraction data.
Example: int a;
a = 10; is acceptable but
a = 10.05 is not acceptable.
b) Float Data Type: This type of data is used to store the
real values in a variable. The value may have some
fractional or decimal data.
Example: float a;
a = 10; is acceptable but it will be interpreted as a = 10.0
a = 10.05 is acceptable.
c) Character Data Type: This type of data is used to store
some text or alphabets in a variable. The character is
always written within single quotes.
Example: char answer;
answer = “T”;
d) Double Data Type: This type of data is used to store the
numeric value in the variable. It is same as of float data
type but the capability of this data type is larger than the
float data type size.
Example: double a;
a = 10.0000000100
2. Non-Primitive Data type: These are more sophisticated data,
which are derived from the primitive data. The user defines
data emphasize the structuring of a group of homogeneous or
heterogeneous data items.
Linear Data Structure: Linear data structures are the data
structures in which data is arranged or accessed (read or write) in
straight sequence or the consecutive way one by one in a list.
Examples: Arrays, Stacks, Queues, and List.
a) Array: it is a collection of all the elements with similar
data types. The array is the collection of a finite number
of homogenous data element such that the elements
of the array are referenced respectively by an index
6 Data Structures with C Programming

set consisting of ‘n’ consecutive numbers and stored


respectively in successive memory locations.
Example: int A[4]; The computer reserved four storage locations as
shown below:

Figure 1.3: One-dimensional array.


b) Stack: it is a data structure which follows last in first out
(LIFO) mechanism. It means the first element will insert
is to remove the last one. Example: if a stack of elements
40, 60, 80, and 100. Here 20 will be the bottommost
element and 100 will be the topmost element in a stack.
A stack is shown in Figure 1.4.

Figure: 1.4: Stack data structure.

Figure 1.5: Queue structure.


c) Queue: It is a data structure, which follows, first in first
out (FIFO) mechanism. It means the first element inserted
is the first one to remove. Queue uses two variables rear
and front.
d) Linked List: A linked list is a set of nodes where each
node has two fields: an information or data and link or
next address field. The ‘data’ field store actual piece of
Data Structures 7

information, which may be an integer, a character, a


string or even a large record and ‘link’ field is used to
point to next node. Hence link list of integer 20, 40, 60,
80 is shown in Figure 1.6.

Figure 1.6: Representation of link list.


Non-Linear data structures: Non-Linear data structures are the data
in which data may be arranged in unordered or hierarchical manner; for
example, Trees, Graphs.
a) Tree: it is a non-linear data structure in which data are
arranged in a sorted sequence. It is used to represent the
hierarchical relationship of several data items.

Figure 1.7: Tree data structure.


b) Graph: A graph is a non-linear data structure which
consists of set of nodes called vertices V and set of edges
E which links vertices. From Figure 1.8, V (G) = {1, 2, 3,
4,5,6}, E(G) = {(1,2),(2,1),(2,3), (3,2), (1,4), (4,1), (4,5),
(5,4), (5,6), (6,5), (3,6),(6,3)}

Figure 1.8: A graph.


8 Data Structures with C Programming

1.4. INTRODUCTION TO ALGORITHM


An algorithm is composed of a finite set of steps, each of which may require
one or more operations. An algorithm is a finite set of instructions that, if
followed, accomplished a particular task. Example: The algorithm makes
the sum of two numbers 20 and 30.
Step 1: Start
Step 2: Store 20 into X and 30 into Y.
Step 3: Calculate SUM = X + Y.
Step 4: Print the value of SUM.
Step 5: Stop.
Basic Characteristics of An algorithm:
• Input: an algorithm should have zero or more inputs are externally
supplied.
• Output: At least one quantity is produced.
• Definiteness: Each instruction is clear and unambiguous.
• Finiteness: if we trace out the instructions of the algorithm, then
for all cases, the algorithm terminates after a finite number of
steps.
• Effectiveness: Every instruction must be very basic so that it can
be carried out, in principle, by a person using only a pencil and
paper.
A program is the expression of an algorithm in a programming language.
Sometimes words such as procedure, function, and subroutine are used
synonymously for the program.
Program = Data structure + Algorithms

1.4.1. Analysis of Programs


The analysis of the program does not mean simply working of the program,
but to check whether for all possible situations program works or not. The
analysis also involves working of the program efficiently. Efficiency in the
sense,
1. The program requires less amount of storage space.
2. The programs get executed in very less amount of time.
Data Structures 9

The time and space are factors which determine the efficiencies of the
program. The time required for execution of the program cannot be computed
in terms of seconds because of the following factors.
1. The hardware of the machine.
2. The amount of time required by each machine instruction.
3. The amount of time required by the compilers to execute the
instruction.
4. The instruction set.

1.4.2. Complexity of an Algorithm


The analysis of algorithms is a major task in computer science. In order to
compare algorithms, there must be some criteria for the major effects of
algorithms. The algorithm can be evaluated by a variety of criteria. The rate
of growth of the time or space required to solve larger and larger instance of
a program. There are three conditions for complexity theory is as follows:
• Worst case: The worst-case time complexity is the function
defined by the maximum amount of time needed by the algorithm
for an input of size, ‘n.’ Therefore, it is a function which defined
by the maximum number of steps taken for any instance that size
‘n.’
• Average case: The average case time complexity is the execution
of an algorithm having typical input data of size ‘n.’ Therefore, it
is a function which defined by the average number of steps taken
for any instance that size ‘n.’
• Best case: The best case time complexity is the minimum
amount of time that an algorithm requires for an input of size ‘n.’
Therefore, it is a function which defined by the minimum number
of steps taken for any instance that size ‘n.’
Space Complexity: The space complexity of a program is the amount
of memory it needs to run to completion. The space needed by a program is
the sum of the following components-
• A fixed part that includes space for the code, space for simple
variable and fixed size component variables.
• The variable part that consists of the space needed by the
component variable where size is dependent on the particular
problem.
Random documents with unrelated
content Scribd suggests to you:
XIX

De nouveau, le malade est étendu dans son lit. Il ne se lève plus,


et il ne demande plus qu’on le lève. Aggravation de son mal ?
Usure ? Non. Retour à son état véritable. Une violente passion a
ramassé dans ce corps ce qui demeurait de forces éparses.
Dépensées plus lentement dans le jour à jour d’une vie chétive et
sans ardeur, ces mêmes forces ne l’auraient pas sauvé.
Il ne souffre pas et son humeur est calme. L’ange est auprès de
lui, redevenu ange. Rien de changé dans leurs apparences : mais
elle n’a plus d’angoisse ni d’émoi, et lui n’a plus de désir. Entre eux,
dans la gravité de ces heures, la communion de l’amour, loin de se
relâcher, se fait plus étroite. Et dans le sens originel et absolu du
mot, ils « se comprennent » enfin, c’est-à-dire qu’ils s’absorbent l’un
l’autre.
Le médecin vient chaque jour, ausculte attentivement la base des
poumons et le cœur, exhorte le malade, s’il ne peut se lever, à rester
le plus possible assis sur son lit. Puis, d’un ton qu’il s’efforce de
rendre cordial :
— Monseigneur, dit-il, c’est une question de patience. Nous voilà
dans une période stationnaire… Mais tout ce que nous avons acquis
reste acquis.
Et il s’en va, souriant, sans que Madeleine l’accompagne.
Le comte Osterrek vient aussi chaque jour visiter son royal
camarade. Le prince lui fait bon accueil. Mais, comme on lui interdit
de parler trop, l’entrevue ne dépasse guère une demi-heure. Une
fois, le prince a demandé :
— La comtesse d’Armatt a-t-elle quitté la ville ?
— Non, monseigneur. Elle est toujours au Bellevue.
Et, là-dessus, ils n’ont rien dit de plus.
Enfin un troisième visiteur pénètre quotidiennement, à la nuit
tombée, dans le Palace et dans la chambre, si discrètement que,
chaque fois, il apparaît au chevet du malade sans que nul bruit de
pas ou de porte l’ait annoncé. D’ailleurs, sa taille est très petite et sa
soutane noire semble se diluer comme une ombre dans l’ombre.
Le reste des heures, le malade et l’infirmière les passent tête à
tête. Madeleine a livré son secret à cette oreille d’ombre qui déjà
l’écouta dans l’église noire et blanche. Comme naguère sur
Stéphanie, le Ego te absolvo est descendu sur elle. Et voici que de
nouveau les voix d’au-delà conversent avec elle… Sûre de sa
réconciliation, elle ne se défend point d’aspirer dans sa mémoire et
dans son cœur la forme mortelle de son maître, pour l’y garder
autant que dureront cette mémoire et ce cœur. Et lui, écoutant la
voix lente et pressante qui lui verse la paix, apprend à ne pas avoir
peur.

Il mourut l’avant-dernière nuit de novembre. Dans la journée,


respirant avec peine, mais calme et lucide, il avait reçu l’onction des
mains de l’abbate Nervi. Un peu plus tard, le comte Osterrek et la
comtesse d’Armatt, introduits quelques instants, avaient entendu ses
adieux. Son désir formel fut ensuite d’être laissé seul avec
Madeleine. Il lui livra ses mains et ne prononça plus une parole. Tant
que ses yeux eurent la force de regarder, il la regarda. Puis, comme
tous les soirs précédents, Madeleine le vit fermer ses paupières. Et
ce fut par le contact des mains qu’elle sentit défaillir peu à peu la
chaleur vivante de son maître bien-aimé.
Il avait signifié sa volonté de reposer dans le cimetière de la
petite ville lacustre. C’est un jardin d’arbres verts, peuplé
d’abondantes et naïves sculptures. Toute la population passagère et
un grand nombre d’habitants suivirent le cortège que conduisait
Osterrek, représentant officiel de la famille royale. Stéphanie, non
plus que Madeleine, n’y figuraient point. On ne put, faute de temps,
qu’installer provisoirement sur la tombe une dalle et une croix de
marbre. Elles disparurent vite sous les chrysanthèmes, les mimosas
et les roses que les assistants — surtout des femmes — y
déposèrent.
XX

Devant ces fleurs entassées, qu’épargnait le temps doux et sec


du pacifique automne, la comtesse d’Armatt vint prier le lendemain
aux environs de dix heures. Elle partait, l’après-midi même, pour le
couvent de la Quarantaine.
Elle pria, le cœur écrasé de chagrin. La discipline ascétique avait
ranimé dans ce cœur une foi trop sincère pour que la mort d’un être
chéri, surtout une mort pénitente, la désemparât. Elle souffrait (et
s’accusait de souffrir) parce que le rachat du pécheur s’était
accompli en dehors d’elle, parce qu’elle en avait été exclue. Certes,
Paul l’avait reçue à son chevet, avait sollicité son pardon et s’était
recommandé à sa ferveur. Mais une autre avait recueilli son haleine
expirante, après l’avoir, par une sorte de magie, converti et
réconcilié. Cette autre, Stéphanie l’avait entrevue au moment de
quitter le prince, si touchante et vraiment si belle que, par une
brusque intuition, elle avait tout compris.
Maintenant, devant la tombe fleurie, sa désolation devenait
insupportable. La force de prier lui manqua peu à peu. Une tentation
de désespoir, presque de révolte, la redressa. Elle sanglota debout,
dans ce cimetière vide, éclatant de soleil. Elle sanglota comme une
enfant châtiée… « Ce n’est pas juste, pensait-elle. Non. Ce n’est pas
juste !… » Ses muscles fléchissants la soutenaient à peine, et ses
pleurs, après tant de pleurs versés depuis qu’elle avait revu son
amant, dissolvaient les derniers vestiges de sa beauté.
Elle tressaillit tout à coup, au rappel d’une sensation qui la
reportait à cinq mois vers le passé. Deux doigts, venus de derrière
elle, se posaient comme alors sur son poignet et lui communiquaient
pareillement une volonté à la fois impérieuse et calmante. Elle se
retourna ; l’émotion lui ôta la possibilité de prononcer même un nom.
Devant ses yeux — effaçant la vision belle et touchante qu’ils
gardaient de l’infirmière entrevue, — surgissait une petite forme
noire à coiffe blanche, exactement la même qui, sur le seuil du
corridor aux « Silence ! » lui avait fait le même attouchement.
La petite nonne dit :
— Prions !
Stéphanie ne se déroba point. Agenouillées côte à côte, la
pécheresse sentit comme naguère, à travers leurs vêtements, la
chaleur de l’ange la pénétrer. Et elle ne sut pas si c’était elle-même
ou si c’était Madeleine qui murmurait :
« Nous vous rendons grâce d’avoir accordé à nos prières la
pieuse fin de celui que nous aimons. Tant que nous vivrons, nous ne
cesserons de vous implorer pour que vous le receviez dans votre
repos. »
Elles se relevèrent. Madeleine soutint le regard anxieux de
Stéphanie qui hésitait à parler. Elle se décida :
— Madeleine, j’ai le cœur troublé… Laisse-moi te poser une
question.
Madeleine, sans répondre, exprima par l’attention de tout son
visage qu’elle écoutait.
— Moi, dit Stéphanie, je n’ai pas consenti et j’ai été exclue. Toi, tu
as consenti, et l’as sauvé. Est-ce juste ?
Madeleine médita un instant, puis répondit :
— Nous avons été deux vases d’argile dans la main du potier. Et,
comme dit l’Apôtre, que sommes-nous pour juger ce qu’il a fait de
nous ?
Stéphanie baissa la tête. La tentation de révolte luttait contre
l’effort de se soumettre. Alors, pour la première fois — était-ce
l’influence toute proche de celle qui l’avait initiée à la vie mystique ?
— elle crut entendre une voix intérieure qui lui disait : « Ne
comprends-tu pas que cette humiliation paye ton rachat ?… » Et
comme si cette voix avait été entendue de l’initiatrice, celle-ci lui dit :
— Si vous n’aviez point porté votre repentir au couvent, serais-je
venue jamais ici ?
— C’est vrai, fit Stéphanie, relevant le front.
Un élan de tendresse la remua vers cette petite servante de Dieu
qui trouvait pour elle le verbe de consolation.
— Il faut que je parte, dit-elle. On m’attend là-bas… J’ai hâte que
la porte se referme sur moi pour toujours…
Et, saisissant les mains de sa compagne, elle ajouta
passionnément :
— Ne me laisse pas partir seule !
Madeleine hocha le front :
— Je ne peux pas.
— Pourquoi ?
— Je serai sa garde, tant que je vivrai.
Leurs mains se disjoignirent en silence.
— Alors, adieu !
— Adieu.
Sa haute taille dépassant la bordure des jeunes cyprès, la
comtesse d’Armatt s’éloigna vers la grille de sortie. Arrivée au
premier coude de l’allée, elle regarda en arrière. La petite silhouette
noire coiffée de blanc demeurait immobile au bord de la tombe,
tournée vers le monceau des fleurs.

FIN

E. GREVIN — IMPRIMERIE DE LAGNY — 3-1927.


DERNIÈRES PUBLICATIONS, DANS LA MÊME
COLLECTION

ALANIC (MATHILDE)
Francine chez les gens de rien, roman 12 »
AURIOL (G.), TRISTAN BERNARD, COURTELINE (G.), RENARD (J.), VEBER
(P.)
X…, roman impromptu 12 »
BARBUSSE (HENRI)
Le Feu, roman (360e mille) 12 »
Les bourreaux (13e mille) 10 »
Jésus (35e mille) 12 »
BEAUNIER (ANDRÉ)
L’amie de La Rochefoucauld 12 »
BINET-VALMER
Coligny (Un grand Français) 12 »
BIRABEAU (ANDRÉ)
Toutes les mêmes, Monsieur 12 »
BLASCO-IBAÑEZ (V.)
La reine Calafia, roman. Traduit de l’espagnol par C.-A. Pelecier 12 »
BORDEAUX (HENRY), de l’Acad. française
La fée de Port-Cros, roman. Nouv. édit. illustrée 12 »
BOUTET (FRÉDÉRIC)
Le harem éparpillé, roman 12 »
CHÉRAU (GASTON), de l’Acad. Goncourt
Monseigneur voyage, roman (16e mille) 12 »
COLETTE
La fin de chéri, roman (45e m.) 7 50
DAUDET (LÉON), de l’Acad. Goncourt
Le Sang de la nuit, roman (15e m.) 12 »
DEKOBRA (MAURICE)
Le rire dans le brouillard (22e m.) 12 »
DÉMIANS D’ARCHIMBAUD (M.)
Le roman d’une jeune fille pauvre 12 »
DORMOY (MARIE)
L’exorcisée, roman 12 »
DUVERNOIS (HENRI)
Morte la bête 12 »
FARRÈRE (CLAUDE)
Cent millions d’or (32e mille) 12 »
Le dernier Dieu, roman (60e mille) 12 »
L’extraordinaire aventure d’Achmet Pacha Djemaleddine. Nouv. édit.
illustrée (33e m.) 12 »
FISCHER (MAX ET ALEX)
Dans une baignoire, notes et impression de théâtre 12 »
FOLEŸ (CHARLES)
Guilleri Guilloré, roman 12 »
FORT (PAUL)
Les fleurs de lys (Ballades françaises V). Édition définitive 10 »
FRAPIÉ (LÉON)
La divinisée, roman d’une femme 12 »
FRAPPA (JEAN-JOSÉ)
A Paris, sous l’œil des métèques, roman (40e mille) 12 »
GÉNIAUX (CHARLES)
Les feux s’éteignent, roman 12 »
GONCOURT (EDMOND ET JULES DE)
Préfaces et manifestes littéraires (Édition définitive) 10 »
GYP
Le journal d’un philosophe, roman (19e mille) 12 »
HIRSCH (CHARLES-HENRY)
Confession d’un voleur 12 »
LEMONNIER (LÉON)
La femme sans péché, roman 12 »
LENORMAND (H.-R.)
A l’écart 12 »
MARGUERITTE (VICTOR)
La garçonne, roman (625e mille) 12 »
Le compagnon, roman (225e m.) 12 »
Le couple, roman (160e mille) 12 »
Jean-Jacques et l’amour (30e m.) 10 »
MAURRAS (CHARLES)
Anthinéa, d’Athènes à Florence (23e mille) 12 »
MAXIME-DAVID (JEANNE)
Un homme comme quelques autres, roman 12 »
MIRBEAU (OCTAVE)
Les écrivains (2e série) 12 »
MIRZA RIZA KHAN-ARFA (Princesse)
Un violon chanta, roman 12 »
MORENO (MARGUERITE)
La statue de sel et le bonhomme de neige. Souvenirs de ma vie et de
quelques autres 12 »
NAUDEAU (LUDOVIC)
L’Italie fasciste ou l’autre danger 12 »
OSSENDOWSKI (FERDINAND ANTONI)
Derrière la muraille chinoise, roman contemporain. Traduit par M.
Robert Renard 12 »
QUINEL (CHARLES)
Pour amuser le percepteur 10 »
RACHILDE
Monsieur Vénus, roman (42e mille) 9 »
REBOUX (Paul)
Trio, roman (20e mille) 12 »
ROBERT (LOUIS DE)
Ni avec toi ni sans toi, roman 12 »
ROSNY AINÉ (J.-H.), de l’Acad. Goncourt
Une jeune fille à la page, roman (10e mille) 12 »
ROSTAND (MAURICE)
L’ange du suicide, roman 10 »
SÉGUR (NICOLAS)
Platon cherche l’amour, roman 12 »
TITAŸNA
Voyage autour de mon amant, roman 10 »
TRILBI (T.)
La jolie bêtise, roman 12 »
VALDAGNE (PIERRE)
Entre l’amour et les affaires, roman 12 »
ZAMACOÏS (MIGUEL)
Un singulier roman d’amour 12 »

417. — Paris. — Imp. Hemmerlé, Petit et Cie. 3-1927.


*** END OF THE PROJECT GUTENBERG EBOOK LA RETRAITE
ARDENTE ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.
1.F.6. INDEMNITY - You agree to indemnify and hold the
Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
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