Data Structures Using C 2nd Edition A. K. Sharma download
Data Structures Using C 2nd Edition A. K. Sharma download
Sharma
download
https://ebookname.com/product/data-structures-using-c-2nd-
edition-a-k-sharma/
https://ebookname.com/product/data-structures-with-c-using-
stl-2nd-edition-william-h-ford/
https://ebookname.com/product/c-data-structures-a-laboratory-
course-stefan-brandle/
https://ebookname.com/product/object-oriented-data-structures-
using-java-chip-weems/
https://ebookname.com/product/the-cyberspace-handbook-media-
practice-1st-edition-jason-whittaker/
https://ebookname.com/product/10-less-democracy-why-you-should-
trust-elites-a-little-more-and-the-masses-a-little-less-garett-
jones/
https://ebookname.com/product/modular-electricity-storage-
benefits-and-costs-1st-edition-brent-n-mendell/
https://ebookname.com/product/long-term-durability-of-structural-
materials-1st-edition-j-larsen-basse/
https://ebookname.com/product/international-law-and-post-
conflict-reconstruction-policy-1st-edition-matthew-saul-editor/
My Word Plagiarism and College Culture 1st Edition
Susan D. Blum
https://ebookname.com/product/my-word-plagiarism-and-college-
culture-1st-edition-susan-d-blum/
Data Structures Using C
This page is intentionally left blank.
Data Structures Using C
Second Edition
A. K. Sharma
Professor and Dean
YMCA University of Science and Technology
Delhi • Chennai
Copyright © 2013 Dorling Kindersley (India) Pvt. Ltd.
Licensees of Pearson Education in South Asia
No part of this eBook may be used or reproduced in any manner whatsoever without the publisher’s
prior written consent.
This eBook may or may not include all assets that were part of the print version. The publisher
reserves the right to remove any material in this eBook at any time.
ISBN 9788131792544
eISBN 9789332514225
Head Office: A-8(A), Sector 62, Knowledge Boulevard, 7th Floor, NOIDA 201 309, India
Registered Office: 11 Local Shopping Centre, Panchsheel Park, New Delhi 110 017, India
To
my parents,
wife Suman and daughter Sagun
This page is intentionally left blank.
Contents
Preface to the Second Edition xiii
Preface xiv
About the Author xv
Chapter 1: Overview of C 1
1.1 The History 1
1.2 Characters Used in C 2
1.3 Data Types 2
1.3.1 Integer Data Type (int) 2
1.3.2 Character Data Type (char) 3
1.3.3 The Floating Point (f loat) Data Type 3
1.4 C Tokens 4
1.4.1 Identifiers 4
1.4.2 Keywords 5
1.4.3 Variables 5
1.4.4 Constants 7
1.5 Structure of a C Program 8
1.5.1 Our First Program 8
1.6 printf() and scanf() Functions 8
1.6.1 How to Display Data Using printf() Function 9
1.6.2 How to Read Data from Keyboard Using scanf() 10
1.7 Comments 10
1.8 Escape Sequence (Backslash Character Constants) 11
1.9 Operators and Expressions 13
1.9.1 Arithmetic Operators 13
1.9.2 Relational and Logical Operators 14
1.9.3 Conditional Operator 16
1.9.4 Order of Evaluation of Expressions 17
1.9.5 Some Special Operators 18
1.9.6 Assignment Operator 18
1.9.7 Bitwise Shift Operators 19
1.10 Flow of Control 20
1.10.1 The Compound Statement 21
1.10.2 Selective Execution (Conditional Statements) 21
1.10.3 Repetitive Execution (Iterative Statements) 25
1.10.4 The exit() Function 27
1.10.5 Nested Loops 28
1.10.6 The Goto Statement (Unconditional Branching) 28
viii Data Structures Using C
Index 501
Preface to the
Second Edition
I have been encouraged by the excellent response given by the readers to the first edition of the book to
work on the second edition. As per the feedback received from the teachers of the subject and the input
provided by the team at Pearson Education, the following topics in various chapters of the book have
been added:
1. Sparse matrices
2. Recursion
3. Hashing
4. Weighted binary trees
a. Huffman algorithm
5. Spanning trees, minimum cost spanning trees
a. Kruskal algorithm
b. Prims algorithm
6. Shortest path problems
a. Warshall’s algorithm
b. Floyd’s algorithm
c. Dijkstra’s algorithm
7. Indexed file organization
While revising the book, the text has been thoroughly edited and the errors found thereof have been
corrected. More examples on important topics have been included.
I hope the readers will like this revised edition of the book and, as before, will provide their much
needed feedback and comments for further improvement.
Acknowledgements
I am thankful to Khushboo Jain and Anuradha Pillai for helping me in preparing the solution manual
of the book.
A. K. Sharma
Preface
As a student, programmer, and teacher of computer engineering, I find ‘Data Structures’ a core course of
computer engineering and particularly central to programming process.
In fact in our day-to-day life, we are confronted with situations such as where I would keep a bunch
of keys, a pen, coins, two thousand rupees, a chalk, and five hundred thousand rupees.
I would keep the bunch of keys and coins in the left and right pockets of my pants, respectively. The
pen gets clipped to the front pocket of the shirt whereas two thousand rupees would go into my ticket
pocket. I would definitely put the five hundred thousand rupees into a safe, i.e., under the lock and key.
While teaching, I will keep the chalk in hand. The decision of choosing the places for these items is based
on two factors: ease of accessibility and security.
Similarly, given a problem situation, a mature programmer chooses the most appropriate data
structures to organize and store data associated with the problem. The reason being that the intel-
ligent choice of data structures will decide the fate of the software in terms of effectiveness, speed
and efficiency—the three most important much-needed features for the success of a commercial
venture.
I have taught ‘Data Structures’ for more than a decade and, therefore, the demand to write a book on
this subject was there for quite some time by my students and teacher colleagues.
The hallmark of this book is that it would not only help students to understand the concepts govern-
ing the data structures but also to develop a talent in them to use the art of discrimination to choose the
right data structures for a given problem situation. In order to provide a hands-on experience to budding
software engineers, implementations of the operations defined on data structures using ‘C’ have been
provided. The book has a balance between the fundamentals and advanced features, supported by solved
examples.
This book would not have been possible without the well wishes and contribution of many people
in terms of suggestions and useful remarks provided by them during its production. I record my
thanks to Dr Ashutosh Dixit, Anuradha Pillai, Sandya Dixit, Dr Komal Bhatia, Rosy Bhatia, Harsh, and
Indu Grover.
I am indebted to my teachers and research guides, Professor J. P. Gupta, Professor Padam Kumar,
Professor Moinuddin, and Professor D. P. Agarwal, for their encouragement. I am also thankful to
my friends, Professor Asok De, Professor Qasim Rafiq, Professor N.S. Gill, Rajiv Kapur and Professor
Rajender Sahu, for their continuous support and useful comments.
I am also thankful to various teams at Pearson who made this beautiful book happen.
Finally, I would like to extend special thanks to my parents, wife Suman and daughter Sagun for
saying ‘yes’ for this project when both wanted to say ‘no’. I know that I have stolen some of the quality
time which I ought to have spent with them.
Some errors might have unwittingly crept in. I shall be grateful if they are brought to my notice.
I would also be happy to acknowledge suggestions for further improvement of this book.
A. K. Sharma
About the Author
A. K. Sharma is currently Chairman, Department of Computer Engineering, and
Dean of Faculty, Engineering and Technology at YMCA University of Science and
Technology, Faridabad. He is also a member of the Board of Studies committee of
Maharshi Dayanand University, Rohtak. He has guided ten Ph.D. theses and has
published about 215 research papers in national and international journals of re-
pute. He heads a group of researchers actively working on the design of different
types of ‘Crawlers.
This page is intentionally left blank.
Overview of C
1
Chapter
n Loose typing
n Structured language
n Wide use of pointers to access data structures and physical memory of the system
Besides the above characteristics, the C programs are small and efficient. A ‘C’ program can be
compiled on variety of computers.
2 Data Structures Using C
n Long integer: A long integer is referred to as long int or simple long. It is stored in 32 bits and
The unsigned int is stored in one word of the memory whereas the unsigned short is stored in
16 bits and does not depend upon the word size of the memory.
Examples of invalid integers are:
(i) 9, 24, 173 illegal-comma used
(ii) 5.29 illegal-decimal point used
(iii) 79 248 blank used
Overview of C 3
n double: The numbers of double data type are stored in 64 bits of memory.
4 Data Structures Using C
A summary of C basic data types is given the Table 1.1. From this table, it may be observed that charac-
ter and integer type data can also be declared as unsigned. Such data types are called unsigned data types.
In this representation, the data is always a positive number with range starting from 0 to a maximum
value. Thus, a number twice as big as a signed number can be represented through unsigned data types.
1.4 C TOKEnS
A token is a group of characters that logically belong together. In fact, a programmer can write a program
by using tokens. C supports the following types of tokens:
n Identifiers
n Keywords
n Constants
n Variables
1.4.1 Identifiers
Symbolic names can be used in C for various data items. For example, if a programmer desires to store a
value 27, then he can choose any symbolic name (say, ROLL) and use it as given below:
ROLL = 27;
Where ROLL is a memory location and the symbol ‘5’ is an assignment operator.
The significance of the above statement is that ‘ROLL’ is a symbolic name for a memory location
where the value 27 is being stored. A symbolic name is generally known as an identifier.
The identifier is a sequence of characters taken from C character set. The number of characters in
an identifier is not fixed though most of the C compilers allow 31 characters. The rules for the formation
of an identifier are:
n An identifier can consist of alphabets, digits and and/or underscores.
n C is case sensitive, i.e., upper case and lower case letters are considered different from each other.
n An identifier can start with an underscore character. Some special C names begin with the
underscore.
n Special characters such as blank space, comma, semicolon, colon, period, slash, etc. are not allowed.
n The name of an identifier should be so chosen that its usage and meaning becomes clear. For
example, total, salary, roll no, etc. are self explanatory identifiers.
Overview of C 5
1.4.2 Keywords
A keyword is a reserved word of C. This cannot be used n Table 1.2 Standard keywords in C
as an identifier by the user in his program. The set of C
auto double int struct
keywords is given in Table 1.2.
break else long switch
1.4.3 Variables case enum register typedef
A variable is the most fundamental aspect of any com- char extern return union
puter language. It is a location in the computer memory const float short unsigned
which can store data and is given a symbolic name for continue for signed void
easy reference. The variables can be used to hold differ-
default goto sizeof volatile
ent values at different times during a program run. To
do if static while
understand this concept, let us have a look at the follow-
ing set of statements:
Total 5 500.25; ...(i)
Net 5 Total 2 100.00; ...(ii)
In statement (i), value 500.25 has been stored in a memory location called Total. The variable Total
is being used in statement (ii) for the calculation of another variable Net. The point worth noting is that
‘the variable Total is used in statement (ii) by its name not by its value’.
Before a variable is used in a program, it has to be defined. This activity enables the compiler to
make available the appropriate amount of space and location in the memory. The definition of a variable
consists of its type followed by the name of the variable. For example, a variable called Total of type float
can be declared as shown below:
float Total;
Similarly, the variable net of type int can also be defined as shown below:
int Net;
Examples of valid variable declarations are:
(i) int count;
(ii) int i, j, k;
(iii) char ch, first;
6 Data Structures Using C
From Figure 1.3, we can see that besides its type a variable has three entities associated with it, i.e.,
the name of variable (val), its physical address (4715), and its contents (100). The content of a variable
is also called its rvalue whereas the physical address of the variable is called its lvalue. Thus, lvalue
and rvalue of variable val are 4715 and 100, respectively. The lvalue is of more importance because it
is an expression that should appear on the left hand side of assignment operator because it refers to the
variable or object.
Memory
1.4.4 Constants
A constant is a memory location which can store data in such a manner that its value during execu-
tion of a program does not change. Any attempt to change the value of a constant will result in an
error message. A constant in C can be of any of the basic data types, i.e., integer constant, float-
ing point constant, and character constant. const qualifier is used to declare a constant as shown
below:
const <type> <name> 5 <val>;
where
const: is a reserved word of C
<type>: is any of the basic data types
<name>: is the identifier name
<val>: is the value to be assigned to the constant.
(1) Integer constant: It is a constant which can be assigned integer values only. For example, if we
desire to have a constant called rate of type integer containing a fixed value 50, then the follow-
ing declaration can be used:
const int rate 5 50;
The above declaration means that rate is a constant of type integer having a fixed value 50. Consider
the following declaration:
const int rate;
rate 5 50;
The above initialization of constant rate is illegal. This is because of the reason that a constant can-
not be initialized for a value at a place other than where it is declared. It may be further noted that if a
program does not change or mutates\a constant or constant object then the program is called as const
correct.
(2) Floating point constant: It is a constant which can be assigned values of real or floating point
type. For example, if it is desired to have a constant called Pi containing value 3.1415, then the
following declaration can be used.
const float Pi = 3.1415;
The above declaration means that Pi is a constant of type float having a fixed value 3.1415. It may be
noted here that by default a floating point constant is of type double.
(3) Character constant: A character constant can contain a single character of information. Thus,
data such as ‘Y’ or ‘N’ is known as a character constant. Let us assume that it is desired to have a
constant called Akshar containing the character ‘Q’; following declaration can be used to obtain
such a constant.
const char Akshar = ‘Q’;
The above declaration means that Akshar is a constant of type char having a fixed value ‘Q’.
A sequence of characters enclosed within quotes is known as a string literal. For example, the
character sequence “computer” is a string literal. When a string literal is assigned to an identifier
declared as a constant, then it is known as a string constant. In fact, a string is an array of
characters. Arrays are discussed later in the chapter.
8 Data Structures Using C
Note:
(i) C is a case sensitive language, i.e., it distinguishes between upper case and lower case characters.
Thus, main() is different from Main(). In fact, most of the characters used in C are lowercase.
Hence, it is safest to type everything in lower case except when a programmer needs to capitalize
some text.
(ii) Every C program has a function called main followed by parentheses. It is from here that
program execution begins. A function is basically a subprogram and is complete in itself.
(iii) The task to be performed by a function is enclosed in curly braces called its body, i.e., {}.
These braces are equivalent to begin and end keywords used in some other languages like
Pascal. The body of function contains a set of statements and each statement must end with
a semicolon.
There was no more discussion on this present occasion about the future.
Evelyn being again properly clothed, they went back by a short cut across
the sand-dunes to the clearing in the forest behind, which was known as Le
Touquet. For a space of their way, after they had got out of the pitiless sun
on the sand, their path led through the primeval pine forest, where the air
was redolent and aromatic, and the footfall went softly over the carpet of
brown needles. Then other growths began, the white poplar of France shook
tremulous leaves in fear of the wind that might be coming, young oak-trees
stood sturdy and defiant where poplars trembled, and away from the pines
the bare earth showed a carpet of excellent green. Then, as they approached
the hotel, neat white boards with black arrows displayed signs in all
directions, and a rustic bridge over a pond, by which stretched a green
sward of lawn on which it was ‘defended to circulate,’ led to the gravel
sweep in front of the hotel.
A broad verandah in the admirable French style sheltered those who
lunched there from the sun; small tables were dotted about it, and from the
glare of the gravel sweep it was refreshment to be shielded from the heat.
Their table was ready spread for them, and the obsequious smile of the
head-waiter hailed them.
But for the first time Madge was not content. Evelyn still sat opposite
her; all was as it had been during the last week. Yet when he said: “Oh, how
delicious, I am so hungry!” she felt she was hungry, too, but not in the way
he meant. She was hungry, as women always are and must be, for the sense
of largeness in the man, and she asked herself, but quenched the question
before it had flamed, if she had given herself to just a boy. Yet how she
loved him! She loved even his airy irresponsibility, though at times, as this
morning, she had found it rather trying. She had lived so much in a world
that schemed and planned, and was for ever wondering what the effect of
doing this or avoiding that would be, that his utter want of calculation, of
considering the interpretation that might be placed on his acts, was as
refreshing as the breath of cool night air on one who leaves the crowded
ball-room. And for very shame she could not go on just now pressing him to
make decisions; she would return to that again to-morrow, for to-day
seemed so made for him and his huge delight in all that was sunny and
honey-gathering. To-morrow, also, she would have to mention another
question that demanded consideration, namely, that of money. They were
living here, with their big sitting-room and the motor-car they had hired—
and, as a matter-of-fact, did not use—on a scale that she knew must be
beyond their means; and since she was perfectly certain that Evelyn had
never given a thought to this question of expense, any more than the price
of the wine which he chose to drink concerned him, it was clearly time to
remind him that things had to be paid for. He had loaded her, too, with
presents; she felt that if she had expressed a desire for the moon, he would
have ordered the longest ladder that the world had ever seen in order,
anyhow, to make preliminary investigations with regard to the possibility of
securing it. He apparently had not the slightest notion of the value of
money, no ideas of his were connected with it, and though this argued a
certain defective apparatus in this money-seeking world, as if a man went
out to walk in a place full of revolver-armed burglars with no more
equipment than a penny cane, she could not help liking his insouciance.
Once she taxed him with his imprudence, and he had told her, with great
indignation, how he had read nothing but financial papers for a whole week
earlier in the summer, and at the end, instead of spending a couple of
thousand pounds in various delightful ways, he had invested it in some
South African company in which—well, a man who was very acute in such
matters was much interested. And yet she called him imprudent!
After lunch they strolled across to the lawn where circulation was
forbidden.
“We won’t be breaking any rules,” said he, “unless the word applies to
the currents of the blood, because we will sit under a tree and probably
sleep. I can think of nothing which so little resembles circulation as that.”
Letters and papers had arrived during lunch, and Evelyn gave a great
laugh of amusement as he opened one from Lady Taverner, asking if he
would be in London during October, and could resume—this was
diplomatic—the sittings that had been interrupted.
“Even that branch of my career hasn’t suffered,” he observed.
There was nothing more of epistolary interest, and he opened the paper.
There, too, the world seemed to be standing still. There had been a skirmish
between Russian and Japanese outposts at a place called something like
Pingpong, fiscalitis seemed to be spreading a little, but otherwise news was
meagre.
“Is there nothing?” asked Madge, when he had read out these headings.
“No, not a birth or death even. Oh, by-the-way, you called me imprudent
the other day! Now we’ll find the money-market, and see what my two
thousand pounds is worth. Great Scott, what names they deal in—
Metiekull, that’s it.”
There was a long silence. Then Evelyn laughed, a sudden little, bitter
laugh, which was new to Madge’s ears.
“Yes, I bought them at 4,” he said. “They are now 2. That was a grand
piece of information Philip gave me.”
He got up.
“Oh, Evelyn, how horrible!” she cried. “Where are you going?”
“Just to telegraph to them to sell out,” he said. “I can’t afford to lose any
more. I’ll be back in a minute. And when I come back, dear, please don’t
allude to this again. It is unpleasant; and that is an excellent reason for
ceasing to think about it. In fact, it is the best reason.”
FOURTEENTH
T was perhaps lucky as regards the future of Madge and her husband
that this debacle had taken place so near to the end of the season.
Many people, indeed, had waited in London only for the marriage,
for the season was already over, and for the last three days there had been
nothing but this to detain them. Genuine sympathy was at first felt for
Philip, but it very soon was known that he was at his office again every day
and all day, worked just as hard if not harder than usual, and was supposed,
by way of signalising his own disappointment, to have made some great
coup over a South African company, thereby inflicting a quantity of very
smart disappointments on the gentlemen of the Stock Exchange. He had
dealt these blows out with an impartial hand; first there had been some
staggering smacks which had sent the bulls flying like ninepins, while the
bears stood round and grinned, and profited by the experience of their
fraternal enemies. Then Philip, it seemed, had seen them grinning, and had
done the same for them.
In other words, things had come off in exactly the way he had
anticipated. The knowledge that he had bought a very large option had
induced many operators less substantial than he to buy also, and the sudden
news that he had received a detailed report from the spot, and had
subsequently not exercised his option, landed many of these buyers in
awkward places. Then, as was natural, the bears saw their opportunity, sold
largely, on the strength of the inference that Philip’s report was highly
unfavourable, bringing prices down with a run. Then, with the same
suddenness with which he had decided not to take up his option, he bought
at this very much lower price a vastly increased number of shares, and
within a week of the original slump Metiekull was considerably higher than
it had ever been. The £7,000 he had forfeited over not taking up his option
was but a bagatelle to his subsequent gains, and the market generally at this
conclusion remarked, among other things not worth repeating, that there
was a good deal to be said in favour of long spoons; while that not
inconsiderable part of more westerly London which is always burning its
fingers in this City fire of the Stock Exchange, said with a somewhat
cynical smile that since Philip could still hit so hard, he had not, perhaps,
been so hard hit himself. Perhaps, in fact, Madge had not made such a very
terrible mistake, after all, for Mr. Dundas was undeniably the most
fascinating person, whereas Philip, so it appeared, did not let the most
dreadful affair of the heart interfere in the slightest with the stuffing of the
money-box.
But in this they utterly mistook him, for this steady, concentrated
application to work was, perhaps, the only thing in the world which could
have prevented him breaking down or losing his mental balance altogether.
Even as it was, it partook only, as far as he could see, of the nature of a
temporary alleviation, for in the very nature of things he could not go on
working like this indefinitely. And what would happen to him when he
relaxed he could not imagine, he only knew that the hours when he was not
at the office were like some nightmare repeated and again repeated. Nor did
they lose, at present, the slightest edge of the intensity of their horror. This
week was as bad as last week; last week was no better than the week before,
all through this hot August when he remained in town, not leaving it even
for his usual week end on the river, but seeing its pavements grow hotter
and dustier and emptier as more and more of its toiling crowds escaped for
a week or two to the sands or the moors.
The worst time of all was the early morning, for though he usually went
to sleep from sheer weariness when he went to bed, he began to wake early,
while still Jermyn Street was dusky and dewy, and as yet the sparrows in
the plane trees opposite his window had not begun to tune up for the day.
Morning by morning he would watch “the casement slowly grow a
glimmering square,” or if it was, as often, absolutely unbearable to lie in
bed, he would get up and go into his sitting-room, where the wan light but
brought back to him the dreadful hours he had passed there the evening
before. The glass from which he had drunk stood on the little table by the
sofa, and by it lay the unread evening paper. The beloved Reynolds prints,
Mrs. Carnac, Lady Halliday, Lady Stanhope, Lady Crosbie, all first
impressions, smiled meaninglessly on the wall, for all the things he had
loved and studied had lost their beauty, and were blackened like dahlias in
the first autumn frosts. Sometimes a piece of music stood on the piano,
from which he had played a bar or two the night before, but had then
stopped, for it, too, conveyed nothing to him; it was but a jangle of
senseless chords. Sometimes in these dreadful morning hours he would
doze a little on the sofa, but not often; and once he had poured out into the
glass a stiff dose of whisky, feeling that even an alcohol-purchased oblivion
would be better than more of this wakefulness. But he had the sense left not
to take to that; if he did that to-day he would do it to-morrow, and if he
admitted the legitimacy of such relief, he knew he would find less and less
reason every day for not letting himself sink in that slough. Besides, he had
to keep himself clear-headed and alert for the work of the day.
Two passions, to analyse a little further, except when he was at work,
entirely possessed him, one his passion for Madge, of which not one jot, in
spite of what had happened, was abated. It was not, nor ever had been, of
the feverish or demonstrative sort, it did not flicker or flare, it burned
steadily with a flame that was as essential a part of his life as breathing or
the heart-beat. And the other, existing strangely and coincidently with it,
was the passion of hate—hatred for her, hatred for Evelyn, a red flame
which shed its light on all else, so that in the glare of it he hated the whole
world. Two people only stood outside of it—his mother and Tom Merivale;
for these he did not feel hate, but he no longer felt love; he was incapable of
feeling that any longer except for Madge. But he did not object to them, he
thought of them without resentment, but that was all.
Then, as his nerves began to suffer under this daily torture, the hours of
enforced idleness became full of alarm. What he feared he did not know, he
only knew that he was apprehensive of some further blow that might be
dealt him from a quarter as unexpected as that from which this had come.
Everything had been so utterly serene when this bolt from the blue struck
him, he could not have conjectured it; and now he could not conjecture
what he expected next.
But all this London did not know: it only knew that this very keen man
of business was as acute as ever, to judge by the Metiekull episode, and
began to reason that since he was so callous to what had happened, Madge
had really not behaved so outrageously as had been supposed. She had
found—this was the more human and kindly view induced by the cessation
of the late London hours, and the substitution of a great deal of open air for
the stifling ballroom of town—she had found that she really was in love
with Mr. Dundas, and that Philip on closer acquaintance was what he had
proved himself to be, business man first, lover afterwards. And really Mr.
Dundas’s pictures this year had been stupefyingly clever. They made one
just gasp. Surely it would be silly to get somebody else to “do” one instead
of him, just because Madge had found out her mistake in time, and he had
assisted at the correction of it. He was certain to have heaps of orders in any
case, so it would be just as well to be painted by him as soon as possible. Of
course that implied that one accepted his marriage in a sort of way, but,
after all, why not? Besides—here the world’s tongue just tended to
approach the cheek—it would be a kindness to old Lady Ellington to
smooth things over as much as possible, and that dear little thing, Gladys,
whom everybody liked so much, would be so pleased to find that Madge
was not hardly thought of. Yes, quite so, and has the dressing-gong sounded
already? And Tom killed a stag, and they had a good day among the grouse,
and Jack killed a salmon, so there will be fish for dinner. What a blessing!
The tree that had been struck by lightning at the end of the garden he had
felled soon after, and part of his daily work now was to cut up the branches
into faggots and sticks of firewood for the winter. That dreadful stroke from
the skies which had dealt death to this beautiful tree in the prime of its
strength and luxuriance of its summer had often seemed to Merivale to
involve a difficult question, for it was intimately bound up with all those
things on which he had deliberately turned his back. Death did exist in the
world, and though, as he had once said to Evelyn, out of death invariably
came life, yet the fact of death was there, just as beyond all possibility of
denial, pain and disease and sorrow were in the world also. These, however,
were largely of man’s making, yet here, in the case of this poor stricken
tree, it was Nature herself who deliberately attacked and slew part of
herself. One animal, it is true, preyed on another, and by its death sustained
its own life: that was far easier to understand. But there was something
senseless and brutal in the fact of this weapon of the storm, a thing as
inanimate as a rifle-bullet, striking at life. It was wanton destruction.
Nothing came of it (and here he smiled, though not believing he had
guessed the riddle), except firewood for him.
The morning was intensely hot, and as he worked hatless under the blaze
of the sun, the wholesome sweat of toil poured from him. How good that
was; how good, too, to feel the strong resistance of the wood against the
blade of his axe, to feel the sinews of his arms alternately tighten and
slacken themselves in the swiping strokes, to stand straight up a moment to
rest his back, and wipe the moisture from his face and draw in two or three
long, satisfying breaths of summer air. It was as if the song of the birds, too,
entered into his very lungs, and the hum of the bees, and the murmur of the
forest, which was beginning to be hushed a little at the hour when even the
cicala sleeps. One thing alone would not be hushed, and that the liquid
voice of the river, in which he would soon be plunged. No length of drought
in this wonderful year seemed to diminish the wealth of its outpouring; it
was as high between its fern-fringed banks now as it had been in April. But
first there was the carrying of the aromatic, fresh-cut logs to the house to be
done, and he almost regretted how near completion was the stack that filled
the wood-shed, for there was something about the hardness of this
particular toil that was intimately delightful. It required the exercise of
strength and vigour, the full use of supple and well-hardened muscles; it
was very typical of the splendid struggle for life in which the struggle itself,
the fact of work, was a thing ecstatic. He had cut more than usual this
morning, and it was with a boyish sense of playing some game against a
rigid and inflexible opponent that he determined not to make two journeys
of it, but carry all he had cut in one. And underneath this staggering burden
which he loved he toiled to the wood-shed.
Merivale had just come up from his bathe in the evening when Philip
arrived, and he met him halfway up the garden. That extraordinary change
which he had himself seen in the glass that morning struck his friend, too.
“It was awfully good of you to let me come, Tom,” he said. “And what
has been happening to you? If I had not known you ten years ago, I should
scarcely have recognised you now.”
Tom laughed.
“And in ten days you won’t recognise yourself,” he said. “You look
pulled down, and no wonder, if you’ve been working in London all August.
Anyhow, this isn’t the least like London, and you are going to do no work.
You are going to sit in the garden, and go for immense slow walks, and
listen to my practically incessant and wholly fatuous conversation.”
But it was difficult for him to conceal the shock that Philip’s appearance
gave him. He looked so horribly tired and so old. The suffering of this last
month had made him haggard and heavy-eyed, and what was worse, the
hatred that had been his soul’s guest had made his face hard and bitter, and
yet for all the hardness it was strangely enfeebled: it had lost the look of
strength and life that had always been so characteristic of it. The vital
principle had been withdrawn from it; all that it expressed was lethal,
negative.
Philip’s weary eyes looked round on the garden and the low, thatched
house where dinner was already being laid in the verandah.
“So this is the Hermitage,” he said. “Dear God, you have found peace.”
Then he broke off suddenly, and began again in a different voice, a voice
that was like his face, bitter and hard and old.
“Yes, I’ve been overworking,” he said, “and as I told you, yesterday I
suddenly collapsed. I think my work has got on my brain too much; I didn’t
sleep well. London was dreadfully hot and stuffy, too. But I’ve made a pot
of money this month. Those fools on the Stock Exchange say that August is
a slack month. Of course it is if you are slack. But certainly from a business
point of view I’ve had an all-round time. I brought some of them back, too,
from their deer-forests and fishings in double-quick time. And they were
mostly too late even then. Good joke, too, my going off suddenly like this,
and leaving them grilling in London.”
Merivale could not quite let this pass; besides, he must answer somehow.
He laughed.
“I don’t altogether agree with your idea of humour,” he said. “Was it
really—from a humorous point of view—worth while?”
Philip’s face did not relax.
“It was from a business point of view,” he said.
Then his gardener’s eye was suddenly arrested by a perle des jardins that
was ramping beyond all bounds.
“I used to know about roses,” he said, “and I’ll cut that back for you to-
morrow. You are not getting half the roses out of it.”
“I know, but it’s enjoying itself so enormously,” said Merivale.
Philip considered this as an abstract question on to which he had not
previously turned his mind.
“And you think that ought to be taken into consideration when one deals
with the destinies even of rose-trees?” he asked with a terrible air of being
in earnest.
Merivale smiled.
“Decidedly London has not been good for you,” he said. “I think your
words were ‘the destinies even of rose-trees.’ Now what destiny matters
more than that? Not mine, I am sure, and I doubt if yours. Besides, the
destinies of your rose-trees used to be of extraordinary importance, not only
to them, but to you.”
Philip was silent a moment. Then for the first time, at the sense of peace
that was here so predominant a note, or at the sight of Tom himself, in all
the vigour and freshness of a youth that measured by years was already
past, some faint gleam, or if not a gleam, the sense that light was possible to
him, broke through the dismal darkness of his soul. For one short moment
he laid his hand on his friend’s arm.
“Make allowance for me, Tom,” he said.
In spite of his long aloofness from the fretful race of men and the ways
of them, Merivale had not forgotten—indeed it is as impossible for one who
has ever known it to forget it as it is to forget how to swim—that divine gift
of tact. Indeed, it is probable that his long sojournings alone had, if
anything, made more sensitive those surfaces which come into contact with
others and which others insensibly feel (for this is tact) to be smooth and
warm and wise. And it was a fine touch that he did not respond, however
remotely, to Philip’s appeal, for Philip had told him that pity and sympathy
were exactly what he could not stand. Consequently he let this cry be the
voice of one in the desert; it wanted silence, not audible answer. He, like the
trees in the garden and the stream, must be dumb to it.
This silence was the key to several days that followed: there was, in fact,
no intimate conversation of any sort between the two friends. Philip would
sit for hours in the garden, stung sometimes into spasmodic activity, during
which he would send off a dozen telegrams to his office on monetary
affairs, but for the most part with an unread paper on his knees, or a book
that tumbled unheeded on to the grass. But soon during this frosty and
strictured time, Merivale thought he saw, as birds know the hour of sunrise
before the faintest dawn illuminates the sky, that there were signs that this
frost was less binding than it had been. Philip would take a pruning-knife
sometimes, and with his deft and practised hand reduce a rose to reasonable
dimensions. Sometimes half-way through the operation he would let the
knife fall from his fingers, as if his labours, like everything else, were not
worth while; but often afterwards he would resume his labours, and enable
the tree to do justice to itself. By degrees, too, these outbursts of City
activity grew rarer and more spasmodic, becoming, as it were, but the
echoes of a habit rather than demonstrations of the habit itself. He did not
join Merivale in his long tramps over the forest, but he began to wait for his
return, and if he knew from what point of the compass he was likely to
return, he sometimes set out to meet him. Once Merivale was very late: his
tramp had taken him further than usual, and night, falling cloudy and
moonless, had surprised him in a wood where even one who knew the
forest as well as he might miss his way. On this occasion he found Philip
pacing up and down the garden in some agitation.
“Ah, there you are,” he cried in a tone of obvious relief when his white-
flannelled figure appeared against the deep dusk of the bushes that lined the
stream. “I was getting anxious, and I did not know what to do. I should
have come out to look for you, but I did not know where you might be
coming from.”
And that little touch of anxiety was perhaps the first sign that he had
shown since he had abandoned himself to bitterness that his heart was not
dead: never before had the faintest spark of the sense of human
comradeship or its solicitudes appeared.
Then Merivale knew that the fortnight that Philip had already spent here
had not been utterly wasted, and before going to bed that night he wrote one
line of hope to Mrs. Home.
FIFTEENTH
COUPLE of days after this the weather suddenly broke, and for the
unclouded and azure skies they had a day of low, weeping heavens,
with an air of dead and stifling dampness. Never for a moment
through the hours of daylight did the sullen downpour relax; the trees stood
with listless, drooping branches, from which under the drenching rain a few
early autumn leaves kept falling, though the time of the fall of the leaf was
not yet. In the garden beds the plants had given up all attempts to look gay
or to stand up, and bent drearily enough beneath the rain that scattered their
petals and dragged their foliage in the muddy earth. The birds, too, were
silent; only the hiss of the rain was heard, and towards afternoon the voice
of the river grew a little louder. Merivale, however, was undeterred and
quite undepressed by these almost amphibious conditions, and, as usual,
went off after breakfast for one of those long rambles of his in the forest,
leaving Philip alone. There was no hint of unfriendliness taken in this;
indeed, Philip had exacted a promise from his host on the evening of arrival
that his normal course of life should be undisturbed.
That first little token that he had given two days before that his heart was
not dead had more than once repeated itself since then, and he was perhaps
faintly conscious of some change in himself. He was not, so far as he knew,
less unhappy, but that frightful hardness was beginning to break down, the
surface of its ice was damped with thawed water, his hatred of all the world,
his deep resentment at the scheme of things—if any scheme underlay the
wantonness of what had happened—was less pronounced. It might, indeed,
be only that he was utterly broken, that his spirit of rebellion could no
longer raise its banner of revolt, yet he did not feel as if he had surrendered,
he did not in the least fold his hands and wait mutely for whatever the
Powers that be might choose to do with him. He was conscious, indeed, of
the opposite, of a certain sense of dawning willpower; and though his life,
so to speak, lay shattered round him, he knew that subconsciously somehow
he was beginning to regard the pieces with some slight curiosity that was
new to him, wondering if this bit would fit on to that. In a way he had
plunged into business again with that feverish rush which had taken him
through August with some such idea; his immediate salvation, at any rate,
he had believed to lie in concentrated occupation; yet there had been
nothing constructive about that; it was a palliative measure, to relieve pain,
rather than a course that would go to the root of the disease. Also, such as it
was, it had failed, his health had given way: he could for the present take no
more of that opiate.
In another respect also it had failed, for to-day by the mid-day post there
had come for him communications of the greatest importance from the City,
information which was valuable, provided only he acted on it without delay.
There was no difficulty about it, the question had no complications; he
himself had only to send off instructions which ten minutes’ thought could
easily frame. Yet he sat with paper and pens in front of him, doing nothing,
for he had asked himself a very simple question instead. “Is it all worth
while?” was what he said to himself. And apparently it was not.
Now, if this had happened a month ago, it would have been equivalent to
a surrender; it would have been a confession that he was beaten. But now
the whole nature of his doubt was changed. Work, it is true, had done
something for him; it had got him through a month in which he was
incapable of anything else, it had got him, in fact, to the point which was
indicated two days ago by his little anxiety about Merivale. And had he
known it, that was much the most important things that had happened to
him for weeks. Something within him had instinctively claimed kinship
again with mankind.
How hollow and objectless to-day seemed the results of the last month!
“Home’s August,” as it was already ruefully known on the Stock Exchange,
had plentifully enriched Home, but though the gold had poured in like a
fountain, yet, mixed with it, indissolubly knitted into the success, had come
a leanness. What did it all amount to? And lean above all was his paltry
triumph over Evelyn, who, as he had since ascertained, had sold out
Metiekull when things were at their very worst, only to realise that if he had
left it alone, he would have made a handsome profit. But what then? What
good did that pin-prick of a vengeance do? What gratification had it brought
to Philip’s most revengeful and hating mood? The wedding-tour had been
cut short: Evelyn and Madge had come back to London, but that to-day
gave him not the smallest feeling of satisfaction in that, however feebly, he
had hit back at them. It was all so useless: the futility and childishness of
his revenge made him feel sick. If he had a similar chance to-day, he would
not have stirred a finger.
But all this emptiness, and the intolerable depression that still enveloped
him, was, somehow, of different character to what it had been before. It was
all bad and hopeless enough, but his eyes, so to speak, had begun to veer
round; they were no longer drearily fixed on the storms and wreckage of the
past, but were beginning, however, ineffectually as yet, to peer into the
mists of the future. It was exactly this which was indicative of the change
that had come, and the indication was as significant as the slow shifting of a
weather-cock that tells that the blackening east wind is over, and a kindlier
air is breathing, one that perhaps in due time shall call up from the roots
below the earth the sap that shall again burst out in mist and spray of young
green leaf, and put into the heart of the birds that mating-time has come
again. And that first hint of change, though lisped about while yet the
darkness before dawn was most black, is better than all the gold that had
poured in through the hours of the night.
Not all day nor when night fell did the rain cease, but the air was very
warm, and the two dined out as usual in the verandah. The candles burned
steadily in the windless air, casting squares of uncertain light on to the thick
curtain of the night which was hung round them. Merivale, it appeared, had
passed a day of high festival even for him; the rain of which the thirsty
earth was drinking so deeply suited him no less.
“Ah, there is no mood of Nature,” he cried, “which I do not love. This
hot, soaking rain falling windlessly, which other people find so depressing,
is so wonderful. The earth lies beneath it, drinking like a child at its
mother’s breast. The trees stand with drooping leaves, relaxing themselves,
making no effort, just drinking, recuperating. The moths and winged things
creep close into crevices in their bark—I saw a dozen such to-day—or cling
to the underside of the leaves, where they are dry and cool. Everything is
sleeping to-day, and to watch the earth sleep is like watching a child sleep:
however lovely and winsome it is when it is awake, yet its sleep is even
more beautiful. There is not a wrinkle on its face: it is as young as love, and
with closed eyes and mouth half-open it rests.”
Philip was looking at him with a sort of dumb envy, which at length
found voice.
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.
ebookname.com