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

Full download Data Structure and Algorithms Using C++: A Practical Implementation 1st Edition Sachi Nandan Mohanty pdf docx

Implementation

Uploaded by

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

Full download Data Structure and Algorithms Using C++: A Practical Implementation 1st Edition Sachi Nandan Mohanty pdf docx

Implementation

Uploaded by

filassavka7x
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 Structure and Algorithms Using C++: A


Practical Implementation 1st Edition Sachi Nandan
Mohanty

https://textbookfull.com/product/data-structure-and-
algorithms-using-c-a-practical-implementation-1st-edition-
sachi-nandan-mohanty/

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.

Recommender System with Machine Learning and Artificial


Intelligence Practical Tools and Applications in Medical
Agricultural and Other Industries 1st Edition Sachi Nandan
Mohanty (Editor)
https://textbookfull.com/product/recommender-system-with-machine-
learning-and-artificial-intelligence-practical-tools-and-applications-
in-medical-agricultural-and-other-industries-1st-edition-sachi-nandan-
mohanty-editor/
textboxfull.com

Primary Mathematics Textbook 2B Jennifer Hoerst

https://textbookfull.com/product/primary-mathematics-
textbook-2b-jennifer-hoerst/

textboxfull.com

Handbook of Macroeconomics, Volume 2A-2B SET 1st Edition


John B. Taylor

https://textbookfull.com/product/handbook-of-macroeconomics-
volume-2a-2b-set-1st-edition-john-b-taylor/

textboxfull.com

Essential algorithms a practical approach to computer


algorithms using Python and C Second Edition Rod Stephens

https://textbookfull.com/product/essential-algorithms-a-practical-
approach-to-computer-algorithms-using-python-and-c-second-edition-rod-
stephens/
textboxfull.com
Problem Solving in Data Structures & Algorithms Using C
First Edition Jain

https://textbookfull.com/product/problem-solving-in-data-structures-
algorithms-using-c-first-edition-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

Data Mining Algorithms in C++: Data Patterns and


Algorithms for Modern Applications 1st Edition Timothy
Masters
https://textbookfull.com/product/data-mining-algorithms-in-c-data-
patterns-and-algorithms-for-modern-applications-1st-edition-timothy-
masters/
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

Modern Data Mining Algorithms in C++ and CUDA C: Recent


Developments in Feature Extraction and Selection
Algorithms for Data Science 1st Edition Timothy Masters
https://textbookfull.com/product/modern-data-mining-algorithms-in-c-
and-cuda-c-recent-developments-in-feature-extraction-and-selection-
algorithms-for-data-science-1st-edition-timothy-masters/
textboxfull.com
Data Structure and Algorithms
Using C++
Scrivener Publishing
100 Cummings Center, Suite 541J
Beverly, MA 01915-6106

Publishers at Scrivener
Martin Scrivener ([email protected])
Phillip Carmical ([email protected])
Data Structure
and Algorithms Using C++

A Practical Implementation

Edited by
Sachi Nandan Mohanty
ICFAI Foundation For Higher Education, Hyderabad, India
and
Pabitra Kumar Tripathy
Kalam Institute of Technology, Berhampur, India
This edition first published 2021 by John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
and Scrivener Publishing LLC, 100 Cummings Center, Suite 541J, Beverly, MA 01915, USA
© 2021 Scrivener Publishing LLC
For more information about Scrivener publications please visit www.scrivenerpublishing.com.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or other-
wise, except as permitted by law. Advice on how to obtain permission to reuse material from this title
is available at http://www.wiley.com/go/permissions.

Wiley Global Headquarters


111 River Street, Hoboken, NJ 07030, USA

For details of our global editorial offices, customer services, and more information about Wiley prod-
ucts visit us at www.wiley.com.

Limit of Liability/Disclaimer of Warranty


While the publisher and authors have used their best efforts in preparing this work, they make no rep­
resentations or warranties with respect to the accuracy or completeness of the contents of this work and
specifically disclaim all warranties, including without limitation any implied warranties of merchant-­
ability or fitness for a particular purpose. No warranty may be created or extended by sales representa­
tives, written sales materials, or promotional statements for this work. The fact that an organization,
website, or product is referred to in this work as a citation and/or potential source of further informa­
tion does not mean that the publisher and authors endorse the information or services the organiza­
tion, website, or product may provide or recommendations it may make. This work is sold with the
understanding that the publisher is not engaged in rendering professional services. The advice and
strategies contained herein may not be suitable for your situation. You should consult with a specialist
where appropriate. Neither the publisher nor authors shall be liable for any loss of profit or any other
commercial damages, including but not limited to special, incidental, consequential, or other damages.
Further, readers should be aware that websites listed in this work may have changed or disappeared
between when this work was written and when it is read.

Library of Congress Cataloging-in-Publication Data

ISBN 978-1-119-75054-3

Cover image: Pixabay.Com


Cover design by Russell Richardson

Set in size of 11pt and Minion Pro by Manila Typesetting Company, Makati, Philippines

Printed in the USA

10 9 8 7 6 5 4 3 2 1
Contents

Preface xi
1 Introduction to Data Structure 1
1.1 Definition and Use of Data Structure 1
1.2 Types of Data Structure 2
1.3 Algorithm 3
1.4 Complexity of an Algorithm 6
1.5 Efficiency of an Algorithm 7
1.6 Asymptotic Notations 8
1.7 How to Determine Complexities 9
1.8 Questions 13
2 Review of Concepts of ‘C++’ 15
2.1 Array 15
2.1.1 One-Dimensional Array 16
2.1.2 Multi-Dimensional Array 17
2.1.3 String Handling 20
2.2 Function 26
2.2.1 User Defined Functions 26
2.2.2 Construction of a Function 27
2.2.3 Actual Argument and Formal Argument 31
2.2.4 Call by Value and Call by Reference 32
2.2.5 Default Values for Parameters 34
2.2.6 Storage Class Specifiers 35
2.3 Pointer 37
2.3.1 Declaration of a Pointer 37
2.3.2 Initialization of a Pointer 37
2.3.3 Arithmetic With Pointer 38
2.3.4 Passing of a Pointer to Function 39
2.3.5 Returning of a Pointer by Function 40
2.3.6 C++ Null Pointer 41

v
vi Contents

2.4 Structure 42
2.4.1 The typedef Keyword 46
2.5 Questions 47
3 Sparse Matrix 49
3.1 What is Sparse Matrix 49
3.2 Sparse Matrix Representations 49
3.3 Algorithm to Represent the Sparse Matrix 51
3.4 Programs Related to Sparse Matrix 52
3.5 Why to Use Sparse Matrix Instead of Simple Matrix? 56
3.6 Drawbacks of Sparse Matrix 57
3.7 Sparse Matrix and Machine Learning 57
3.8 Questions 58
4 Concepts of Class 59
4.1 Introduction to CLASS 59
4.2 Access Specifiers in C++ 60
4.3 Declaration of Class 60
4.4 Some Manipulator Used In C++ 62
4.5 Defining the Member Functions Outside of the Class 64
4.6 Array of Objects 64
4.7 Pointer to Object 66
4.8 Inline Member Function 67
4.9 Friend Function 69
4.9.1 Simple Friend Function 69
4.9.2 Friend With Inline Substitution 70
4.9.3 Granting Friendship to Another Class
(Friend Class) 71
4.9.4 More Than One Class Having the Same
Friend Function 73
4.10 Static Data Member and Member Functions 75
4.11 Constructor and Destructor 78
4.11.1 Constructor 78
4.11.1.1 Empty Constructor 79
4.11.1.2 Default Constructor 79
4.11.1.3 Parameterized Constructors 80
4.11.1.4 Copy Constructor 81
4.11.2 Destructor 83
4.12 Dynamic Memory Allocation 84
4.13 This Pointer 86
4.14 Class Within Class 87
4.15 Questions 89
Contents vii

5 Stack 91
5.1 STACK 91
5.2 Operations Performed With STACK 91
5.3 ALGORITHMS 93
5.4 Applications of STACK 96
5.5 Programming Implementations of STACK 106
5.6 Questions 126
6 Queue 129
6.1 Queue 129
6.2 Types of Queue 129
6.3 Linear Queue 129
6.4 Circular Queue 134
6.5 Double Ended Queue 138
6.6 Priority Queue 139
6.7 Programs 142
6.8 Questions 165
7 Linked List 167
7.1 Why Use Linked List? 167
7.2 Types of Link List 167
7.3 Single Link List 168
7.4 Programs Related to Single Linked List 177
7.4.1 /* Creation of a Linked List */ 177
7.4.2 /* Insert a Node Into a Simple Linked List at
the Beginning */ 178
7.4.3 /* Insert a Node Into a Simple Linked List at
the End of the List */ 180
7.4.4 /* Insert a Node Into a Simple Linked List
When the Node Is Known */ 182
7.4.5 /* Insert a Node Into a Simple Linked List
Information Is Known and Put After Some
Specified Node */ 184
7.4.6 /* Deleting the First Node From a Simple
Linked List */ 187
7.4.7 /* Deleting the Last Node From a Simple
Linked List */ 189
7.4.8 /* Deleting a Node From a Simple Linked
List When Node Number Is Known */ 191
7.4.9 Deleting a Node From a Simple Linked List
When Information of a Node Is Given 193
viii Contents

7.4.10 /* SEARCH A NODE INTO A SIMPLE LINKED


LIST WITH INFORMATION IS KNOWN*/ 197
7.4.11 /* Sorting a Linked List in Ascending Order */ 199
7.4.12 /* Reversing a Linked List */ 202
7.4.13 Program for Student Data Using Linked List 203
7.5 Double Link List 210
7.6 Programs on Double Linked List 216
7.6.1 /* Creation of Double Linked List */ 216
7.6.2 /* Inserting First Node in the Doubly
Linked List */ 218
7.6.3 /*Inserting a Node in the Doubly Linked List
When Node Number Is Known*/ 220
7.6.4 /*Inserting a Node in the Doubly Linked List
When Information Is Known*/ 223
7.6.5 /* Delete First Node From a Double Linked List */ 226
7.6.6 /*Delete the Last Node From the Double
Linked List*/ 229
7.7 Header Linked List 231
7.7.1 /* Inserting a Node Into a Header Linked List */ 233
7.8 Circular Linked List 235
7.9 Application of Linked List 239
7.9.1 Addition of Two Polynomial 239
7.9.2 /* Polynomial With Help of Linked List */ 240
7.9.3 Program for Linked Queue 241
7.9.4 Program for Linked Stack 243
7.10 Garbage Collection and Compaction 245
7.11 Questions 247
8 TREE 249
8.1 Tree Terminologies 249
8.2 Binary Tree 251
8.3 Representation of Binary Tree 253
8.3.1 Array Representation of a Tree 253
8.3.2 Linked List Representation of a Tree 254
8.4 Operations Performed With the Binary Tree 254
8.4.1 /*Creation of a Tree*/ 255
8.5 Traversing With Tree 256
8.5.1 /* Binary Tree Traversal */ 259
8.6 Conversion of a Tree From Inorder and Preorder 262
Contents ix

8.7 Types of Binary Tree 265


8.8 Expression Tree 265
8.9 Binary Search Tree 268
8.10 Height Balanced Tree (AVL Tree) 272
8.11 Threaded Binary Tree 277
8.12 Heap Tree 279
8.13 Huffman Tree 282
8.14 Decision Tree 286
8.15 B-Tree 287
8.16 B + Tree 292
8.17 General Tree 293
8.18 Red–Black Tree 293
8.19 Questions 294
9 Graph 295
9.1 Graph Terminologies 295
9.2 Representation of Graph 301
9.3 Traversal of Graph 305
9.3.1 Breadth First Search (BFS) 305
9.3.2 Depth First Search 311
9.4 Spanning Tree 315
9.4.1 Kruskal Algorithm 315
9.4.2 Prim’s Algorithm 318
9.5 Single Source Shortest Path 322
9.5.1 Bellman–Ford Algorithm 323
9.5.2 Dijkstra’s Algorithm 327
9.6 All Pair Shortest Path 335
9.7 Topological Sorting 345
9.8 Questions 347
10 Searching and Sorting 349
10.1 Linear Search 349
10.2 Binary Search 351
10.3 Bubble Sort 355
10.4 Selection Sort 359
10.5 Insertion Sort 361
10.6 Merge Sort 363
10.7 Quick Sort 366
10.8 Radix Sort 369
10.9 Heap Sort 372
10.10 Questions 389
x Contents

11 Hashing 391
11.1 Hash Functions 391
11.2 Collisions 393
11.3 Collision Resolution Methods 393
11.4 Clustering 394
11.5 Questions 395
Index 397
Preface

Welcome to the first edition of Data Structures and Algorithms Using C++.
A data structure is the logical or mathematical arrangement of data in
memory. To be effective, data has to be organized in a manner that adds to
the efficiency of an algorithm and also describe the relationships between
these data items and the operations that can be performed on these items.
The choice of appropriate data structures and algorithms forms the funda-
mental step in the design of an efficient program. Thus, a deep understand-
ing of data structure concepts is essential for students who wish to work
on the design and implementation of system software written in C++, an
object-oriented programming language that has gained popularity in both
academia and industry. Therefore, this book was developed to provide
comprehensive and logical coverage of data structures like stacks, queues,
linked lists, trees and graphs, which makes it an excellent choice for learn-
ing data structures. The objective of the book is to introduce the concepts
of data structures and apply these concepts in real-life problem solving.
Most of the examples presented resulted from student interaction in the
classroom. This book utilizes a systematic approach wherein the design of
each of the data structures is followed by algorithms of different operations
that can be performed on them and the analysis of these algorithms in
terms of their running times.
This book was designed to serve as a textbook for undergraduate engi-
neering students across all disciplines and postgraduate level courses in
computer applications. Young researchers working on efficient data storage
and related applications will also find it to be a helpful reference source to
guide them in the newly established techniques of this rapidly growing
research field.

Dr. Sachi Nandan Mohanty and


Prof. Pabitra Kumar Tripathy
December 2020

xi
1
Introduction to Data Structure

1.1 Definition and Use of Data Structure


Data structure is the representation of the logical relationship existing
between individual elements of data. In other words the data structure is a
way of organizing all data items that considers not only the elements stored
but also their relationship to each other.
Data structure specifies

• Organization of data
• Accessing methods
• Degree of associativity
• Processing alternatives for information

The data structures are the building blocks of a program and hence the
selection of a particular data structure stresses on

• The data structures must be rich enough in structure to


reflect the relationship existing between the data, and
• The structure should be simple so that we can process data
effectively whenever required.

In mathematically Algorithm + Data Structure = Program


Finally we can also define the data structure as the “Logical and mathe-
matical model of a particular organization of data”

Sachi Nandan Mohanty and Pabitra Kumar Tripathy. Data Structure and Algorithms Using C++:
A Practical Implementation, (1–14) © 2021 Scrivener Publishing LLC

1
2 Data Structure and Algorithms Using C++

1.2 Types of Data Structure


Data structure can be broadly classified into two categories as Linear and
Non-Linear

DATA STRUCTURE

LINEAR NON LINEAR

ARRAY QUEUE STACK TREE GRAPH TABLES SETS

Linear Data Structures


In linear data structures, values are arranged in linear fashion. Arrays,
linked lists, stacks, and queues are the examples of linear data structures in
which values are stored in a sequence.

Non-Linear Data Structure


This type is opposite to linear. The data values in this structure are not
arranged in order. Tree, graph, table, and sets are the examples of non-
linear data structure.

Operations Performed in Data Structure


In data structure we can perform the operations like

• Traversing
• Insertion
• Deletion
• Merging
• Sorting
• Searching
Introduction to Data Structure 3

1.3 Algorithm
The step by step procedure to solve a problem is known as the ALGORITHM.
An algorithm is a well-organized, pre-arranged, and defined computational
module that receives some values or set of values as input and provides a
single or set of values as out put. These well-defined computational steps
are arranged in sequence, which processes the given input into output.
An algorithm is said to be accurate and truthful only when it provides
the exact wanted output.
The efficiency of an algorithm depends on the time and space complex-
ities. The complexity of an algorithm is the function which gives the run-
ning time and/or space in terms of the input size.

Steps Required to Develop an Algorithm


• Finding a method for solving a problem. Every step of an
algorithm should be defined in a precise and in a clear man-
ner. Pseudo code is also used to describe an algorithm.
• The next step is to validate the algorithm. This step includes
all the steps in our algorithm and should be done manually
by giving the required input, perform the required steps
including in our algorithm and should get the required
amount of output in a finite amount of time.
• Finally implement the algorithm in terms of programming
language.

Mathematical Notations and Functions


™™ Floor and Ceiling Functions
Floor function returns the greatest integer that does not exceed
the number.
Ceiling function returns the least integer that is not less than
the number.

no denotes the floor function

no denotes the ceil function

Ex :
5.23 = 5 5.23 =6
4 Data Structure and Algorithms Using C++

™™ Remainder Function
To find the remainder “mod” function is being used as

A mod B

™™ To find the Integer and Absolute value of a number


INT(5.34) = 5 This statement returns the integer part of
the number
INT(- 6.45) = 6 This statement returns the absolute as well
as the integer portion of the number

™™ Summation Symbol
To add a series of number as a1+ a2 + a3 +…………+ an the
symbol Σ is used

n
Σ ai
i=1

™™ Factorial of a Number
The product of the positive integers from 1 to n is known as
the factorial of n and it is denoted as n!.

0! = 1

Algorithemic Notations
While writing the algorithm the comments are provided with in [ ].
The assignment should use the symbol “: =” instead of “=”
For Input use Read : variable name
For output use write : message/variable name

The control structures can also be allowed to use inside an algorithm but
their way of approaching will be some what different as
Simple If
If condition, then:
Statements
[end of if structure]
Introduction to Data Structure 5

If…else
If condition, then:
Statements
Else :
Statements
[end of if structure]

If…else ladder
If condition1, then:
Statements
Else If condition2, then:
Statements
Else If condition3, then:
Statements
…………………………………………

…………………………………………

…………………………………………
Else If conditionN, then:
Statements
Else:
Statements
[end of if structure]

LOOPING CONSTRUCT
Repeat for var = start_value to end_value by
step_value
Statements
[end of loop]

Repeat while condition:


Statements
[end of loop]
Ex : repeat for I = 1 to 10 by 2
Write: i
[end of loop]

OUTPUT
1 3 5 7 9
6 Data Structure and Algorithms Using C++

1.4 Complexity of an Algorithm


The complexity of programs can be judged by criteria such as whether
it satisfies the original specification task, whether the code is readable.
These factors affect the computing time and storage requirement of the
program.

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 fol-
lowing components:

• A fixed part that includes space for the code, space for sim-
ple variables and fixed size component variables, space for
constants, etc.
• A variable part that consists of the space needed by com-
ponent variables whose size is dependent on the particular
problem instance being solved, and the stack space used by
recursive procedures.

Time Complexity
The time complexity of a program is the amount of computer time it needs
to run to completion. The time complexity is of two types such as

• Compilation time
• Runtime

The amount of time taken by the compiler to compile an algorithm is


known as compilation time. During compilation time it does not calculate
for the executable statements, it calculates only the declaration statements
and checks for any syntax and semantic errors.
The run time depends on the size of an algorithm. If the number of
instructions in an algorithm is large, then the run time is also large, and if
the number of instructions in an algorithm is small, then the time for exe-
cuting the program is also small. The runtime is calculated for executable
statements and not for declaration statements.
Introduction to Data Structure 7

Suppose space is fixed for one algorithm then only run time will be con-
sidered for obtaining the complexity of algorithm, these are

• Best case
• Worst case
• Average case

Best Case
Generally, most of the algorithms behave sometimes in best case. In this
case, algorithm searches the element for the first time by itself.
For example: In linear search, if it finds the element for the first time by
itself, then it behaves as the best case. Best case takes shortest time to exe-
cute, as it causes the algorithms to do the least amount of work.

Worst Case
In worst case, we find the element at the end or when searching of elements
fails. This could involve comparing the key to each list value for a total of
N comparisons.
For example in linear search suppose the element for which algorithm
is searching is the last element of array or it is not available in array then
algorithm behaves as worst case.

Average Case
Analyzing the average case behavior algorithm is a little bit complex than
the best case and worst case. Here, we take the probability with a list of
data. Average case of algorithm should be the average number of steps but
since data can be at any place, so finding exact behavior of algorithm is
difficult. As the volume of data increases, the average case of algorithm
behaves like the worst case of algorithm.

1.5 Efficiency of an Algorithm


Efficiency of an algorithm can be determined by measuring the time, space,
and amount of resources it uses for executing the program. The amount of
time taken by an algorithm can be calculated by finding the number of
steps the algorithm executes, while the space refers to the number of units
it requires for memory storage.
8 Data Structure and Algorithms Using C++

1.6 Asymptotic Notations


The asymptotic notations are the symbols which are used to solve the dif-
ferent algorithms and the notations are

• Big Oh Notation (O)


• Little Oh Notation (o)
• Omega Notation (W)
• Theta Notation (q)

Big Oh (O) Notation


This Notation gives the upper bound for a function to within a constant
factor. We write f(n) = O(g(n)) if there are +ve constants n0 and C such
that to the right of n0, the value of f(n) always lies on or below Cg(n)

Omega Notation (W)


This notation gives a lower bound for a function to with in a constant fac-
tor. We write f(n) = Ωg(n) if there are positive constants n0 and C such that
to the right of n0 the value of f(n) always lies on or above Cg(n)

Theta Notation (q)


This notation bounds the function to within constant factors. We say f(n) =
θg(n) if there exists +ve constants n0, C1 and C2 such that to the right of n0
the value of f(n) always lies between c1g(n) and c2(g(n)) inclusive.

Little Oh Notation (o)


F(n) = o(g(n)) iff f(n) = O(g(n)) and f(n) != Ωg(n).

Introduction
An important question is: How efficient is an algorithm or piece of code?
Efficiency covers lots of resources, including:
CPU (time) usage
Memory usage
Disk usage
Network usage
Introduction to Data Structure 9

All are important but we will mostly talk about CPU time
Be careful to differentiate between:

Performance: how much time/memory/disk/... is actually used


when a program is running. This depends on the machine, compiler, etc.,
as well as the code.

Complexity: how do the resource requirements of a program or algorithm


scale, i.e., what happens as the size of the problem being solved gets larger.
Complexity affects performance but not the other way around. The time
required by a method is proportional to the number of “basic operations”
that it performs. Here are some examples of basic operations:
one arithmetic operation (e.g., +, *).
one assignment
one test (e.g., x == 0)
one read
one write (of a primitive type)

Note: As an example,
O(1) refers to constant time.
O(n) indicates linear time;
O(nk) (k fixed) refers to polynomial time;
O(log n) is called logarithmic time;
O(2n) refers to exponential time, etc.
n² + 3n + 4 is O(n²), since n² + 3n + 4 < 2n² for all n > 10. Strictly speaking,
3n + 4 is O(n²), too, but big-O notation is often misused to mean equal to
rather than less than.

1.7 How to Determine Complexities


In general, how can you determine the running time of a piece of code?
The answer is that it depends on what kinds of statements are used.

1. Sequence of statements
statement 1;
statement 2;
...
statement k;
10 Data Structure and Algorithms Using C++

Note: this is code that really is exactly k statements; this is not


an unrolled loop like the N calls to addBefore shown above.)
The total time is found by adding the times for all statements:

total time = time(statement 1) + time


(statement 2) + ... + time(statement k)

If each statement is “simple” (only involves basic opera-


tions) then the time for each statement is constant and the
total time is also constant: O(1). In the following examples,
assume the statements are simple unless noted otherwise.
2. if-then-else statements
if (cond) {
sequence of statements 1
}
else {
sequence of statements 2
}

Here, either sequence 1 will execute, or sequence 2 will execute.


Therefore, the worst-case time is the slowest of the two possi-
bilities: max(time(sequence 1), time(sequence 2)). For exam-
ple, if sequence 1 is O(N) and sequence 2 is O(1) the worst-case
time for the whole if-then-else statement would be O(N).
3. for loops
for (i = 0; i < N; i++) {
sequence of statements
}

The loop executes N times, so the sequence of statements also


executes N times. Since we assume the statements are O(1), the
total time for the for loop is N * O(1), which is O(N) overall.
4. Nested loops
for (i = 0; i < N; i++) {
for (j = 0; j < M; j++) {
sequence of statements
}
}

The outer loop executes N times. Every time the outer loop
executes, the inner loop executes M times. As a result, the
statements in the inner loop execute a total of N * M times.
Thus, the complexity is O(N * M). In a common special case
Introduction to Data Structure 11

where the stopping condition of the inner loop is j < N


instead of j < M (i.e., the inner loop also executes N times),
the total complexity for the two loops is O(N2).
5. Statements with method calls:
When a statement involves a method call, the complexity of
the statement includes the complexity of the method call.
Assume that you know that method f takes constant time,
and that method g takes time proportional to (linear in) the
value of its parameter k. Then the statements below have the
time complexities indicated.
f(k); // O(1)
g(k); // O(k)

When a loop is involved, the same rule applies. For example:


for (j = 0; j < N; j++) g(N);

has complexity (N2). The loop executes N times and each


method call g(N) is complexity O(N).

Examples
Q1. What is the worst-case complexity of the each of the following code
fragments?

Two loops in a row:


for (i = 0; i < N; i++) {
sequence of statements
}
for (j = 0; j < M; j++) {
sequence of statements
}

Answer: Th
 e first loop is O(N) and the second loop is O(M). Since you
do not know which is bigger, you say this is O(N+M). This can
also be written as O(max(N,M)). In the case where the second
loop goes to N instead of M the complexity is O(N). You can
see this from either expression above. O(N+M) becomes O(2N)
and when you drop the constant it is O(N). O(max(N,M))
becomes O(max(N,N)) which is O(N).
12 Data Structure and Algorithms Using C++

Q2. How would the complexity change if the second loop went to N
instead of M?
A nested loop followed by a non-nested loop:
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
sequence of statements
}
}
for (k = 0; k < N; k++) {
sequence of statements
}

Answer: Th
 e first set of nested loops is O(N2) and the second loop is
O(N). This is O(max(N2,N)) which is O(N2).
Q3. A nested loop in which the number of times the inner loop executes
depends on the value of the outer loop index:
for (i = 0; i < N; i++) {
for (j = i; j < N; j++) {
sequence of statements
}
}

Answer: W
 hen i is 0 the inner loop executes N times. When i is 1 the
inner loop executes N-1 times. In the last iteration of the outer
loop when i is N-1 the inner loop executes 1 time. The number
of times the inner loop statements execute is N + N-1 + ... + 2 +
1. This sum is N(N+1)/2 and gives O(N2).
Q4. For each of the following loops with a method call, determine the
overall complexity. As above, assume that method f takes constant time,
and that method g takes time linear in the value of its parameter.

a. for (j = 0; j < N; j++) f(j);


b. for (j = 0; j < N; j++) g(j);
c. for (j = 0; j < N; j++) g(k);

Answer: a. E
 ach call to f(j) is O(1). The loop executes N times so it is N x
O(1) or O(N).
b. The first time the loop executes j is 0 and g(0) takes “no oper-
ations.” The next time j is 1 and g(1) takes 1 operations. The
last time the loop executes j is N-1 and g(N-1) takes N-1 oper-
ations. The total work is the sum of the first N-1 numbers and
is O(N2).
Introduction to Data Structure 13

c. Each time through the loop g(k) takes k operations and the
loop executes N times. Since you do not know the relative size
of k and N, the overall complexity is O(N x k).

1.8 Questions
1. What is data structure?
2. What are the types of operations that can be performed with
data structure?
3. What is asymptotic notation and why is this used?
4. What is complexity and its type?
5. Find the complexity of 3n2 + 5n.
6. Distinguish between linear and non-linear data structure.
7. Is it necessary is use data structure in every field? Justify
your answer.
2
Review of Concepts of ‘C++’

2.1 Array
Whenever we want to store some values then we have to take the help of a
variable, and for this we must have to declare it before its use. If we want
to store the details of a student so for this purpose we have to declare the
variables as
char name [20], add[30] ;
int roll, age, regdno ;
float total, avg ;
etc……
for a individual student.
If we want to store the details of more than one student than we have to
declare a huge amount of variables and which are too much difficult to access
it. I.e/ the programs length will increased too faster. So it will be better to
declare the variables in a group. I.e/ name variable will be used for more than
one student, roll variable will be used for more than one student, etc.
So to declare the variable of same kind in a group is known as the Array
and the concept of array is used for this purpose only.

Definition: The array is a collection of more than one element of same


kind with a single variable name.

Types of Array:
The arrays can be further classified into two broad categories such as:

• One Dimensional (The array having one boundary


specification)
• Multi dimensional (The array having more than one bound-
ary specification)

Sachi Nandan Mohanty and Pabitra Kumar Tripathy. Data Structure and Algorithms Using C++:
A Practical Implementation, (15–48) © 2021 Scrivener Publishing LLC

15
16 Data Structure and Algorithms Using C++

2.1.1 One-Dimensional Array


Declaration:

Syntax :
Data type variable_name[bound] ;
The data type may be one of the data types that we are studied. The
variable name is also same as the normal variable_name but the bound is
the number which will further specify that how much variables you want
to combine into a single unit.
Ex : int roll[15];
In the above example roll is an array 15 variables whose capacity is to
store the roll_number of 15 students.
And the individual variables are
roll[0] , roll[1], roll[2], roll[3] ,……………..,roll[14]

Array Element in Memory


The array elements are stored in a consecutive manner inside the memory.
i.e./ They allocate a sequential memory allocation.
For Ex : int x[7];
Let the x[0] will be at the memory address 568 then the entire array can
be represented in the memory as

x[0] X[1] X[2] X[3] X[4] X[5] X[6]


568 570 572 574 576 578 580

Initialization:
The array is also initialized just like other normal variable except that
we have to pass a group of elements with in a chain bracket separated by
commas.
Ex : int x[5]= { 24,23,5,67,897 } ;
In the above statement x[0] = 24, x[1] = 23, x[2]=5, x[3]=67,x[4]=897
Review of Concepts of ‘C++’ 17

Retrieving and Storing Some Value From/Into the Array


Since array is a collection of more than one elements of same kind so while
performing any task with the array we have to do that work repeatedly.
Therefore while retrieving or storing the elements from/into an array we
must have to use the concept of looping.

Ex: Write a Program to Input 10 Elements Into an Array and


Display Them.

#include<iostream.h>
void main()
{
int x[10],i;
;
cout<<“\nEnter 10 elements into the array”;
for(i=0 ; i<10; i++)
cin>>x[i];
cout<<“\n THE ENTERED ARRAY ELEMENTS ARE :”;
for(i=0 ; i<10; i++)
cout<<” “<<x[i];
}

OUTPUT
Enter 10 elements into the array
12
36
89
54
6
125
35
87
49
6
 THE ENTERED ARRAY ELEMENTS ARE : 12 36
89 54 6 125 35 87 49 6

2.1.2 Multi-Dimensional Array


The array having more than one boundary specification is known as multi
dimensional array. The total number of elements to be stored in side a
multi dimensional array is equals to the product of its boundaries.
18 Data Structure and Algorithms Using C++

But we do use the two dimensional array to handle the matrix opera-
tions. The two dimensional array having two boundary specifications.

Declaration of Two-Dimensional Array


The declaration of the two dimensional array is just like the one dimen-
sional array except that instead of using a single boundary we have to use
two boundary specification.

SYNTAX
data_type variable_name[boundary1][boundary2];

Ex : int x[3][4];
In the above example x is the two dimensional array which has the capacity
to store (3x4) 12 elements. The individual number of elements are
x[0][0] x[0][1] x[0][2] x[0][3]
x[1][0] x[1][1] x[1][2] x[1][3]
x[2][0] x[2][1] x[2][2] x[2][3]

INITIALIZATION
The array can also be initialized as like one dimensional array.
Ex: int x[3][4] = {{3,5,7,8}, {45,12,34,3}, {56,89,56,23}};
OR
int x[3][4] = {3,5,7,8,45,12,34,3,56,89,56,23};
After the above initialization
x[0][0]=3 x[0][1]=5 x[0][2]=7 x[0][3]=8
x[1][0]=45 x[1][1]=12 x[1][2]=34 x[1][3]=3
x[2][0]=56 x[2][1]=89 x[2][2]=56 x[2][3]=23

Processing of a Two-Dimensional Array


While processing a two-dimensional array we have to use two loops.
Random documents with unrelated
content Scribd suggests to you:
“Mr Huxley has fulfilled the promise that he intimated in his
earlier books to the few who knew him, and demonstrated that he is
one of the finest writers of prose in England today. He is finished and
fastidious, sophisticated and diverting, an authentic figure of some
actual importance and with many potentialities. That he must take a
decided place among the younger contemporary writers in England
is without doubt.” H. S. G.

+ New Repub 24:172 O 13 ’20 1550w

“In lines, sometimes in paragraphs, and in general atmospheric


suggestion, there appears to this reviewer a likeness between Mr
Huxley and Max Beerbohm. The mental attitude of the two men is
dissimilar in many ways. But through them both runs that great
streak of urbanity, of sophistication, of what might almost be termed
jadedness at times. ‘Limbo’ is a book of definite promise and of a
certain achievement.”

+ N Y Times p28 Ag 15 ’20 650w

“Mr Huxley has a very readable and diverting narrative style, a


style with journalism in the first story and literature in the second,
and with full permission, but no obligation, to the reader to climb the
stairs. Mr Huxley’s low estimate of human nature does not tame the
effervescence of his spirits.”

+ − Review 3:111 Ag 4 ’20 300w

“The death of Lully is the only story in which it may occur to the
reader that after all Mr Aldous Huxley is sometimes actuated by the
ideals and sympathies which move ordinary human beings.”
− + Spec 124:494 Ap 10 ’20 140w

“The most remarkable story in the book is ‘The farcical history of


Richard Greenow.’ There is a blunt boyish ring to this which oddly
enough induces the uncanny effect that many writers wallow in
melodrama to obtain. But Mr Huxley’s product is uneven. ‘Happily
ever after’ is as humdrum as the preceding story is distinguished.”

+ − Springf’d Republican p11a S 5 ’20 460w

“Instead of saying that there are seven short stories in ‘Limbo’


which are all clever, amusing, and well written, and recommending
the public to read them, as we can conscientiously do, we are
tempted to state, what it is so seldom necessary to state, that short
stories can be a great deal more than clever, amusing, and well
written. There is another adjective—‘interesting’; that is the adjective
we should like to bestow upon Mr Huxley’s short stories, for it is the
best worth having.”

+ − The Times [London] Lit Sup p83 F 5


’20 800w
I

IGLEHART, FERDINAND COWLE. Theodore


Roosevelt: the man as I knew him. il $1.50 Christian
herald pub.

19–14241

“This life by Dr Iglehart is written from one predetermined


viewpoint. He recognizes the strong religious convictions of
Roosevelt and working from this fact he has interpreted his entire
life as the life of a man all of whose actions are dominated by his
religious life.”—Boston Transcript

“The book is very unevenly written. It is exceedingly entertaining


in parts, while elsewhere the author has allowed his easy rhetorical
English to run away with him. It is equally true there are parts of the
book which will not fit in very easily with the general idea of
Roosevelt’s personality.”

+ − Boston Transcript p6 F 11 ’20 160w


Nation 109:688 N 29 ’19 220w

“A badly arranged mixture of eulogy, biography, and anecdote;


but, for him who will dig for it, it contains much that is interesting,
notably in regard to Roosevelt’s religious views.”
+ − Outlook 126:292 O 13 ’20 200w
R of Rs 62:419 O ’20 950w
Springf’d Republican p10 My 4 ’20
180w

ILCHESTER, GILES STEPHEN HOLLAND


FOX-STRANGWAYS, 6th earl of. Henry Fox,
first lord Holland, his family and relations. 2v il *$12
Scribner

(20–4450)

“The title of Lord Ilchester’s book is a misnomer. It will suggest to


most people a book of private life and family gossip. But not one
twentieth part of what he has written is occupied with these things.
What he has given us is far nearer being a political history of England
from 1739, when Henry Fox obtained his first office, that of surveyor
of the works, till his death in 1774. Of course, the history is primarily
a biography. But during at least the first five-and-twenty of these
thirty-five years Henry Fox played an important part, either as one of
the principal actors or as a spectator on whom the principal actors
were obliged to keep watchful eyes, in nearly all the changing scenes
of ministerial tragedy and comedy. Lord Ilchester has had access to a
great deal of material which has never been used before. Letters and
papers at Holland House, at Melbury, at Bowood, and elsewhere
have provided a mass of evidence, much of it in Henry Fox’s own
hand, as to his motives and opinions at various points in his career.
Occasionally they enable Lord Ilchester to correct the statements or
judgments of previous historians. But on the whole they only fill out
the old picture, without altering its main lines.”—The Times
[London] Lit Sup

“Lord Ilchester’s volumes are strictly a biography. One might feel


at times that Fox’s associates are little more than shadows in the
background of the hero’s portrait; but the character and activities of
the statesman himself are interestingly unfolded on almost every
page. The subject is also presented with studied impartiality.” T. W.
Riker

+ Am Hist R 26:87 O ’20 750w


+ Ath p206 F 13 ’20 1700w

“Amongst historians, Macaulay, Lord Fitzmaurice, and Lord


Roseberry, have written these thirty years down to the bone. Even his
exceptional sources of information have not enabled Lord Ilchester
to tell us anything new about Henry Fox or his contemporaries of
sufficient importance to justify this biography; and we must be
forgiven for saying that Lord Ilchester’s skill and style as a narrator
only suffer by comparison with the great writers we have
mentioned.”

− + Sat R 129:163 F 14 ’20 650w

“The memoir is most interesting and valuable. It not only throws


new light on Fox himself and on the early days of his unlucky son,
Charles James Fox, but it also illustrates from another standpoint
the difficulties—admirably described by Lord Roseberry in his
‘Chatham’—which Pitt had to surmount before he could become
minister in the crisis of the Seven years’ war.”
+ Spec 124:211 F 14 ’20 1450w

“The book is well written and well arranged. The writer knows his
subject and his period and can use his knowledge effectively.”

+ The Times [London] Lit Sup p73 F 5


’20 3650w

In the mountains. *$1.90 (3c) Doubleday

20–19505

The scene of the story is a little house in the Swiss Alps, to which
an English woman, in some more than ordinarily tragic sense,
bereaved by the war, comes to forget her sorrow. It had been her
home in happier days and is to her a house of memories, but the
story, which starts out with every indication of tragedy, turns out
after all to be a very pleasant little comedy. The change comes with
the appearance of the two uninvited guests, Mrs Barnes and Mrs
‘Jewks.’ They bring diversion. provocation and eventually healing.
The story of the mistress of the house is only suggested but that of
Dolly. Mrs ‘Jewks,’ which Mrs Barnes strives so faithfully to hide, is
fully revealed and it is Dolly, whose name should be spelled Juchs,
who is the book’s real heroine. The story is interspersed with
comments on life and books.

“She has a delicate pen that lovingly shapes her phrase, and an
instinct that keeps it true to experience. Perhaps the most interesting
thing about her equipment, her composition, her make-up, is the
slight instability in the mixture of her elements. She is profoundly a
sentimentalist, and her sentimentality keeps jumping out in spite of
all the ironical detachment she can muster against it.” K. M.

+ Ath p272 Ag 27 ’20 550w


+ Booklist 17:116 D ’20

“There is distinction, delicacy, and deft handling throughout. ‘In


the mountains’ may not command a large number of readers, it will
have value, however, in selective readers’ eyes.” R. D. W.

+ Boston Transcript p8 O 16 ’20 520w

“Remarkable for its sweet and gay philosophy of life, keen sense of
humor, novel turns of thought and great facility of expression.
Thought to be by the author of ‘Elizabeth and her German garden.’”

+ Cleveland p105 D ’20 50w

“It is the author’s wayside observations and the unexpected


utterances of the other characters that count so mightily. The story is
simple enough; it is the way it is told that is so engrossing.” W. A.
Dyer

+ N Y Evening Post p14 O 23 ’20 580w

“Whoever she may be, the author of ‘In the mountains’ writes in a
finished style that almost precludes the possibility that her present
book is her first.”

+ N Y Times p24 O 3 ’20 500w


“Both widows are, in their different ways, triumphs of
characterisation, but the preeminence must certainly be assigned to
Mrs Barnes. The devastating influence which genuine unselfishness,
not qualified by intelligence, can exercise on the happiness of others
is illustrated by her example with unsurpassable delicacy and
sureness of touch.”

+ Sat R 130:242 S 18 ’20 680w


Spec 125:439 O 2 ’20 40w

“Told with an unaffected simplicity which is apparently artless, its


charm and sweetness steal upon the mind as with the spell of a
delicate September day that suddenly surprises by its summery heat
and power.”

+ The Times [London] Lit Sup p551 Ag


26 ’20 1000w

“Dolly, the younger of the two (she is forty), is something


delightfully new in heroines and the study of Mrs Barnes, as an
example of the tyranny of unselfishness, is a skillful piece of
analysis.”

+ Wis Lib Bul 16:194 N ’20 180w

INCHBOLD, A. CUNNICK (MRS STANLEY


INCHBOLD). Love and the crescent; a tale of the
Near East. *$1.25 (1c) Stokes

20–11299
The scene of the story is laid in an Armenian village during the
war. It relates the trials of a beautiful girl, daughter of a
distinguished Armenian physician, and her family and tells of
horrors, flights, deportations, miraculous rescues, heroic defences
and Veronica’s final reunion with her French lover and their safe
arrival in France. The deep-dyed villainy of a German consul is
dressed up in suitable romantic garb in contrast to which the Turk
appears as a humanitarian.

“In the portrayal of some of the characters, sometimes in the


description of a scene, or again in the narrative which carries the
story on, the author frequently drops into conventional, mechanical
methods, and so lowers the grade of what would otherwise be a very
excellent novel. But even so its construction is good, its movement
rapid, its story interest well maintained, and its varied scenes are full
of life and color that seem true and are certainly very interesting.”

+ − N Y Times 25:29 Jl 18 ’20 460w

“There are incidents in abundance. But Mrs Inchbold has not been
entirely successful in blending them into a clear-cut story. The
characters seem to walk mechanically across the pages, and there is
scarcely one of them that at the end the reader feels he knows as a
real live human being.”

− + The Times [London] Lit Sup p58 Ja 30


’19 110w

INGALESE, RICHARD. History and power of


mind, new and rev ed *$2.50 (3c) Dodd 131
20–10777

The book is the second printing of a collection of lectures on


occultism and the power of the mind. The author asks the reader to
hold himself agnostically until the course is finished holding in mind
always that if occultism is true it can be demonstrated, for truth is
always demonstrable. The book commends itself to the investigator
of psychic phenomena and of mental therapeutics and the ground
covered is well indicated in its table of contents, viz: Occultism: its
past, present and future; Divine mind: its nature and manifestation;
Dual mind and its origin; The art of self-control; The law of re-
embodiment; Colors of thought vibration; Meditation, creation and
concentration; Lesser occult or psychic forces and their dangers;
Hypnotism, and how to guard against it; Higher occult or spiritual
forces and their uses; The cause and cure of disease; The law of
opulence. There is an index.

INGE, WILLIAM RALPH. Outspoken essays.


*$2.25 (*6s) Longmans 204

20–18249

“The dean of St Paul’s has reprinted in this volume ten articles


from the reviews, three dealing with patriotism, the birth-rate, and
the future of the English race, and seven with ecclesiastical
questions. To these he has prefixed an essay on ‘Our present
discontent.’”—Spec

“He writes as powerfully and learnedly almost as Swift. He is also


as skilful and as unfair a controversialist as Swift. In ‘The future of
the English race’ he handles the results of modern ethnological
research with easy mastery, and it is only the most careful of readers
who will observe what a hiatus lies between the well-marshalled facts
and the conclusions that insidiously follow.”

+ − Ath p1167 N 7 ’19 250w

“Among Dr Inge’s many virtues, which include critical acuteness,


epigrammatic power and a remarkable ability to be fair to persons as
distinct from causes that offend him, must be reckoned his
fearlessness.”

+ Ath p1253 N 28 ’19 1400w


+ Booklist 17:49 N ’20

“What, however, makes his writing so intolerable is his patronizing


way and his spirit of hauteur, as he stands aloof and with the unction
of superiority passes judgment on men and things in the dogmatic
spirit which he censures in others. Whatever may be said about his
interpretations, we must recognize in him a prophet of candor, who
utters the burden of truth with sublime disregard to personal
consequences.” O. L. Joseph

+ − Bookm 51:237 Ap ’20 700w

“This book is replete with worth-while observations by a man of


the world, able to see weak points, yet genially willing to accept
conditions as in a large measure inevitable.”

+ Boston Transcript p7 Mr 13 ’20 300w


“There is so much excellent modern rationalism in Dean Inge’s
commerce with facts and tendencies that one cannot well forgive him
for living emotionally in the dingy atmosphere of the century-old
Malthus.”

+ − Dial 68:540 Ap ’20 100w

“The chief paradox of all is that a scholar whose culture is as broad


as the world should have sympathies even narrower than his native
island. The masterpiece of the whole volume is the attack on the
‘Anglican Catholic’ party in the Established church. In all the
controversy that has raged since the Tracts for the Times, there has
never been so witty and so merciless a diatribe as that in which the
author exposes the pretensions of the Anglican Catholics.” Preserved
Smith

+ − Nation 110:729 My 29 ’20 1050w

“Here, as a free-lance, as a critic of life, men, morals, institutions,


dress, foods, the labor party, political economy and literature, Dean
Inge is his true and powerful self. The scholar, the citizen and the
preacher blend, and the acute observer joins them.” D. S. M.

+ New Repub 24:197 O 20 ’20 2600w

“Whatever may be thought of his scepticism and of his own


attempt to rise through doubt to a position of inexpugnable faith, his
destructive analysis of the various other attempts of the sort is the
work of a master hand. The religious papers in this volume display
what is rare in contemporary English literature, a highly trained
philosopher in the pulpit. Dean Inge has written a remarkable book.”
+ Review 2:396 Ap 17 ’20 1400w
+ Spec 123:663 N 15 ’19 150w
+ Springf’d Republican p8 D 13 ’19 580w
(Reprinted from The Times [London] Lit
Sup p621 N 6 ’19)

“It is a work of rare excellence and importance. We have failed if


we have not made clear that it contains a mature and comprehensive
Christian philosophy. It shirks no difficulties, concedes nothing to
popular sentiment, has the sternness of Jewish prophecy.”

+ The Times [London] Lit Sup p621 N 6


’19 2050w

INGERSOLL, ERNEST. Wit of the wild. il *$2


Dodd 591.5

“This collection of sketches deals for the most part with familiar
birds, animals, fish, and insects—the weasel, wasp, copperhead,
whip-poor-will, and a score of others. It ranges widely from
menhaden and muskrats to tree toads and the Portuguese man-of-
war.” (N Y Evening Post) “There are chapters on animals that
advertise, animals that wear disguises, animals that form
partnerships with other animals, animals that set traps and animals
that bluff.” (N Y Times)

“It is popular natural history at its best. The book is abundantly


and excellently illustrated.”
+ N Y Evening Post p26 O 23 ’20 160w
N Y Times p10 O 10 ’20 500w

[2]
INGPEN, ROGER, ed. One thousand poems for
children. *$2.50 Jacobs 821.08

20–19453

This is a revised and enlarged edition of a former volume of “a


choice of the best verse old and new” (Sub-title) which aims to
provide poetry that is both pleasant to read and profitable to
remember. The selection is graded according to the ages of children,
ranging from the very little tot to the average child of fifteen and the
poems are grouped under the headings: Rhymes for little ones;
Cradle songs; Nursery rhymes; Fairy land; Fables and riddles; The
seasons; Fields and woods; Home; Insects, birds and beasts;
Humorous verse; Poems of patriotism and history; Ballads;
Girlhood; Poems of praise; Miscellaneous. There are indexes of
authors, first lines and titles.

INTERCHURCH WORLD MOVEMENT.


COMMISSION OF INQUIRY. Report on the steel
strike of 1919; with the technical assistance of the
Bureau of industrial research, N.Y. *$2.50 Harcourt
331.89

20–16529
In this report by the Commission of inquiry of the Interchurch
world movement, the basic facts of normal steel employment
conditions are presented with the commission’s findings from a
Christian viewpoint. These findings justify the strike in its central
phase and substantiate the claim that conditions after the strike have
remained the same—a situation characterized as a state of war that
threatens the industrial peace of the nation. The first two chapters
dwell on the inauguration of the inquiry, its scope and method, its
conclusions and recommendations and on the general ignorance of
the real conditions. The rest of the contents are: The twelve-hour day
in a no-conference industry; Wages in a no-conference industry;
Grievances and control in a no-conference industry; Organizing for
conference; Social consequences of arbitrary control; Concluding
(Christian findings); Appendices and index.

“The report is a challenging document and raises fundamental


questions concerning industrial relationships which need to be
raised.” G: M. Janes

+ Am Econ R 10:877 D ’20 1900w


Booklist 17:13 O ’20

“One of the most important documents in the history of American


industry. The report is crowded with revealing statistics and other
important information, but its supreme value proceeds from the fact
that its conclusions have been reached by investigators appointed by
organizations that are ordinarily anything but friendly to labour.” W:
Z. Foster

+ Freeman 2:44 S 22 ’20 850w


“This report is a splendid example of scientific investigation in a
field where prejudice and hysteria make rational judgments difficult.
This work is invaluable.” James Oneal

+ N Y Call p11 D 12 ’20 370w

Reviewed by L. K. Frank

+ Pub W 98:663 S 18 ’20 260w


The Times [London] Lit Sup p655 O 7
’20 90w
+ Wis Lib Bul 16:232 D ’20 90w

“If we had greater faith in the efficacy of education by coercion we


should like to make two books compulsory reading for every
clergyman, newspaper editor, politician, and employer in the United
States. These two books are ‘The great steel strike’ by W. J. Foster
and ‘The steel strike of 1919,’ the report of the Interchurch world
movement’s commission.”

+ World Tomorrow 3:349 N ’20 560w

INTERNATIONAL CONFERENCE OF
WOMEN PHYSICIANS. Proceedings of the
international conference of women physicians. 6v $3;
ea 75c Womans press 613

20–15934
The proceedings of a conference held under the auspices of the
National board of the Y. M. C. A. in New York city, Sept. 17–Oct. 25,
1919. “The conference met in response to a conscious need on the
part of the women physicians in America for free discussion of those
problems that relate to the maintaining and improving of health by
education and other constructive means.... The word ‘health,’ was to
be taken in its fullest sense as meaning the well-being of the entire
personality.” (Preface) The proceedings, issued in six volumes,
contain the addresses of distinguished physicians and specialists,
men as well as women, bearing on all aspects of the subjects of health
of women and children, sex and marriage, social morality, etc. The
six volumes are devoted to: General problems of health; Industrial
health; The health of the child; Moral codes and personality;
Adaptation of the individual to life; Conservation of the health of
women in marriage.

“Both the physician and the layman can profitably read these
discussions.”

+ N Y P L Munic Ref Lib Notes 7:39 O 20


’20 110w

IRWIN, FLORENCE. Poor dear Theodora!


*$1.75 (2c) Putnam
20–6636

Theodora has race but no money. Her genteel family has all the
pride of their poverty and Theodora shocks them by breaking away to
earn her own living. She goes through a variety of experiences from
companion to an invalid old lady and mother’s helper in a feminist’s
household to war-worker. She has been dismissed from her first
position because the old lady suspects her favorite nephew of being
in love with her. She becomes engaged to a “newly rich” philanderer
and breaks it off before it is too late. At last true love “will out” like
murder and the old lady receives her with open arms. Incidentally
the book abounds in reflections on current opinions, tendencies and
fads.

“Theodora appeals to us, because of the sturdy independence of


her mind and her conduct. Her natural individuality is developing.
The novel excels in the delineation of character types.” D. L. M.

+ Boston Transcript p8 Mr 20 ’20 950w

“The story is well written and will be enjoyed by those who care for
this sort of fiction. Its chief fault is its length, which exceeds 400
pages.”

+ − N Y Times 25:168 Ap 11 ’20 600w


Spec 125:539 O 23 ’20 60w
+ The Times [London] Lit Sup p442 Jl 8
’20 170w
IRWIN, WALLACE ADMAH (GINGER,
pseud.). Suffering husbands. *$1.75 (1½c) Doran

20–10767

A collection of short stories, first copyrighted by the Curtis


Publishing Company. Contents: All front and no back; Monkey on a
stick; Peaches and cream; Thunder; The goat; The light that paled;
Free; Gasless Sunday; Mother’s milk.

Booklist 17:33 O ’20


Outlook 125:615 Ag 4 ’20 30w

IRWIN, WALLACE ADMAH (GINGER,


pseud.). Trimmed with red. *$1.75 (2c) Doran

20–6843

A farcical story involving parlor Socialists and society Bolshevists.


Rosamonde Vallant, the young and beautiful wife of a middle-aged
and choleric husband, has just gone thru a course in esoteric eastern
philosophy and wearying of it, has turned to revolution. Her cousin,
Emily Ray, who is in love with Oliver Browning, uses Rosamonde’s
house as a convenient meeting place. Oliver is a soldier who has been
wounded in the service of his country, but alas the wound had come
from the kick of an army mule and Aunt Carmen refuses to see him
in a romantic light. Emily becomes deeply involved in bolshevist
plots and a revolutionary professor falls in love with her, but she
returns in the end to Oliver and his mules.

+ Booklist 16:348 Jl ’20

Reviewed by R. M. Underhill

Bookm 51:443 Je ’20 60w


+ Boston Transcript p8 S 15 ’20 370w

“Pure farce, but most of it is really funny.”

+ Ind 103:323 S 11 ’20 40w

“He had a ‘grand and glorious’ opportunity to create another droll


classic out of the materials used in this book. He did make an
attempt in this direction—an attempt that is well worth reading.
Measured by what it might have been, however, the book is a
failure.” Ralph Cheyney

− + N Y Call p10 Jl 18 ’20 550w

“Though the book is much too long and its humor of the most
obvious kind, it is amusing, and no more absurd than the idiotic
antics it is intended to caricature.”

+ − N Y Times 25:310 Je 13 ’20 450w


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