0% found this document useful (0 votes)
3 views

JavaScript Data Structures and Algorithms An Introduction to Understanding and Implementing Core Data Structure and Algorithm Fundamentals 1st Editon by Sammie Bae ISBN 1484239873 9781484239872 pdf download

The document provides information on various ebooks and textbooks related to JavaScript data structures and algorithms, including titles by authors such as Sammie Bae and Clifford Shaffer. It includes links for downloading these resources and highlights the importance of understanding core data structure and algorithm fundamentals. Additionally, it features a detailed table of contents for a specific book, outlining chapters and topics covered.

Uploaded by

kutlukapy20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

JavaScript Data Structures and Algorithms An Introduction to Understanding and Implementing Core Data Structure and Algorithm Fundamentals 1st Editon by Sammie Bae ISBN 1484239873 9781484239872 pdf download

The document provides information on various ebooks and textbooks related to JavaScript data structures and algorithms, including titles by authors such as Sammie Bae and Clifford Shaffer. It includes links for downloading these resources and highlights the importance of understanding core data structure and algorithm fundamentals. Additionally, it features a detailed table of contents for a specific book, outlining chapters and topics covered.

Uploaded by

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

Download the full version and explore a variety of ebooks

or text books at https://ebookball.com

JavaScript Data Structures and Algorithms An


Introduction to Understanding and Implementing
Core Data Structure and Algorithm Fundamentals 1st
Editon by Sammie Bae ISBN 1484239873
9781484239872
_____ Follow the link below to get your download now _____

https://ebookball.com/product/javascript-data-structures-
and-algorithms-an-introduction-to-understanding-and-
implementing-core-data-structure-and-algorithm-
fundamentals-1st-editon-by-sammie-bae-
isbn-1484239873-9781484239872-15798/

Access ebookball.com now to download high-quality


ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookball.com
for more options!.

A Practical Introduction to Data Structures And Algorithm


Analysis 3rd Edition by Clifford Shaffer

https://ebookball.com/product/a-practical-introduction-to-data-
structures-and-algorithm-analysis-3rd-edition-by-clifford-
shaffer-15310/

Data Structures and Algorithms Made Easy Data Structure


and Algorithmic Puzzles 5th Edition by Careermonk
Publications, Narasimha Karumanchi ISBN 9788193245279
https://ebookball.com/product/data-structures-and-algorithms-made-
easy-data-structure-and-algorithmic-puzzles-5th-edition-by-careermonk-
publications-narasimha-karumanchi-isbn-9788193245279-15800/

Data Structures and Algorithms 1st Edition by Alfred Aho


ISBN 0201000237 9780201000238

https://ebookball.com/product/data-structures-and-algorithms-1st-
edition-by-alfred-aho-isbn-0201000237-9780201000238-25072/

Data Structures and Algorithm Analysis in JavaTM 3rd


edition by Mark Weiss 9780133465013 0133465012

https://ebookball.com/product/data-structures-and-algorithm-analysis-
in-javatm-3rd-edition-by-mark-weiss-9780133465013-0133465012-18710/
Data Structures And Algorithm Analysis in C 4th Edition by
Mark Weiss 013284737X 9780132847377

https://ebookball.com/product/data-structures-and-algorithm-analysis-
in-c-4th-edition-by-mark-weiss-013284737x-9780132847377-15292/

Data Structures and Algorithms in Java 1st Edition by


Peter Drake ISBN 0131469142 9780131469143

https://ebookball.com/product/data-structures-and-algorithms-in-
java-1st-edition-by-peter-drake-isbn-0131469142-9780131469143-12422/

Data Structures and Algorithms in C 1st edition by Adam


Drozdek ASIN B002WLXMBY

https://ebookball.com/product/data-structures-and-algorithms-in-c-1st-
edition-by-adam-drozdek-asin-b002wlxmby-25076/

Data Structures and Algorithm Analysis in C++ 3rd edition


by Clifford Shaffer ISBN 048648582X 978-0486485829

https://ebookball.com/product/data-structures-and-algorithm-analysis-
in-c-3rd-edition-by-clifford-shaffer-
isbn-048648582x-978-0486485829-16486/

Data Structures Algorithms and Applications in C++ 1st


edition by Adam Drozdek ISBN 1133608426 9781133608424

https://ebookball.com/product/data-structures-algorithms-and-
applications-in-c-1st-edition-by-adam-drozdek-
isbn-1133608426-9781133608424-17250/
JavaScript Data
Structures and
Algorithms
An Introduction to Understanding and
Implementing Core Data Structure and
Algorithm Fundamentals

Sammie Bae
JavaScript Data Structures
and Algorithms
An Introduction to Understanding
and Implementing Core Data
Structure and Algorithm
Fundamentals

Sammie Bae
JavaScript Data Structures and Algorithms
Sammie Bae
Hamilton, ON, Canada

ISBN-13 (pbk): 978-1-4842-3987-2 ISBN-13 (electronic): 978-1-4842-3988-9


https://doi.org/10.1007/978-1-4842-3988-9
Library of Congress Control Number: 2019930417

Copyright © 2019 by Sammie Bae


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Louise Corrigan
Development Editor: Chris Nelson
Coordinating Editor: Nancy Chen
Cover designed by eStudioCalamar
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484239872. For more
detailed information, please visit www.apress.com/source-code.
Printed on acid-free paper
This book is dedicated to Dr. Hamid R. Tizhoosh for inspiring
me in my studies and to my mother, Min Kyoung Seo, for her
kindness and support.
Table of Contents
About the Author �����������������������������������������������������������������������������������������������������xv

About the Technical Reviewer �������������������������������������������������������������������������������xvii

Acknowledgments ��������������������������������������������������������������������������������������������������xix

Introduction ������������������������������������������������������������������������������������������������������������xxi

Chapter 1: Big-O Notation ����������������������������������������������������������������������������������������� 1


Big-O Notation Primer ������������������������������������������������������������������������������������������������������������������� 1
Common Examples ������������������������������������������������������������������������������������������������������������������ 2
Rules of Big-O Notation����������������������������������������������������������������������������������������������������������������� 4
Coefficient Rule: “Get Rid of Constants”���������������������������������������������������������������������������������� 5
Sum Rule: “Add Big-Os Up” ����������������������������������������������������������������������������������������������������� 6
Product Rule: “Multiply Big-Os” ���������������������������������������������������������������������������������������������� 7
Polynomial Rule: “Big-O to the Power of k”����������������������������������������������������������������������������� 8
Summary��������������������������������������������������������������������������������������������������������������������������������������� 8
Exercises ��������������������������������������������������������������������������������������������������������������������������������������� 9
Answers��������������������������������������������������������������������������������������������������������������������������������� 11

Chapter 2: JavaScript: Unique Parts ����������������������������������������������������������������������� 13


JavaScript Scope ������������������������������������������������������������������������������������������������������������������������ 13
Global Declaration: Global Scope������������������������������������������������������������������������������������������� 13
Declaration with var: Functional Scope ��������������������������������������������������������������������������������� 13
Declaration with let: Block Scope ������������������������������������������������������������������������������������������ 15

v
Table of Contents

Equality and Types���������������������������������������������������������������������������������������������������������������������� 16


Variable Types������������������������������������������������������������������������������������������������������������������������ 16
Truthy/Falsey Check�������������������������������������������������������������������������������������������������������������� 17
=== vs ==���������������������������������������������������������������������������������������������������������������������������� 18
Objects���������������������������������������������������������������������������������������������������������������������������������� 18
Summary������������������������������������������������������������������������������������������������������������������������������������ 20

Chapter 3: JavaScript Numbers������������������������������������������������������������������������������ 21


Number System�������������������������������������������������������������������������������������������������������������������������� 21
JavaScript Number Object���������������������������������������������������������������������������������������������������������� 23
Integer Rounding������������������������������������������������������������������������������������������������������������������� 23
Number.EPSILON������������������������������������������������������������������������������������������������������������������� 24
Maximums����������������������������������������������������������������������������������������������������������������������������� 24
Minimums������������������������������������������������������������������������������������������������������������������������������ 25
Size Summary����������������������������������������������������������������������������������������������������������������������� 26
Number Algorithms���������������������������������������������������������������������������������������������������������������� 26
Prime Factorization��������������������������������������������������������������������������������������������������������������� 28
Random Number Generator�������������������������������������������������������������������������������������������������������� 29
Exercises������������������������������������������������������������������������������������������������������������������������������������� 29
Summary������������������������������������������������������������������������������������������������������������������������������������ 34

Chapter 4: JavaScript Strings��������������������������������������������������������������������������������� 35


JavaScript String Primitive��������������������������������������������������������������������������������������������������������� 35
String Access������������������������������������������������������������������������������������������������������������������������� 35
String Comparison����������������������������������������������������������������������������������������������������������������� 36
String Search������������������������������������������������������������������������������������������������������������������������� 36
String Decomposition������������������������������������������������������������������������������������������������������������ 38
String Replace����������������������������������������������������������������������������������������������������������������������� 38
Regular Expressions������������������������������������������������������������������������������������������������������������������� 38
Basic Regex��������������������������������������������������������������������������������������������������������������������������� 39
Commonly Used Regexes������������������������������������������������������������������������������������������������������ 39
Encoding������������������������������������������������������������������������������������������������������������������������������������� 41
Base64 Encoding������������������������������������������������������������������������������������������������������������������� 42

vi
Table of Contents

String Shortening������������������������������������������������������������������������������������������������������������������������ 43
Encryption����������������������������������������������������������������������������������������������������������������������������������� 45
RSA Encryption���������������������������������������������������������������������������������������������������������������������� 46
Summary������������������������������������������������������������������������������������������������������������������������������� 50

Chapter 5: JavaScript Arrays��������������������������������������������������������������������������������� 53


Introducing Arrays����������������������������������������������������������������������������������������������������������������������� 53
Insertion�������������������������������������������������������������������������������������������������������������������������������� 53
Deletion��������������������������������������������������������������������������������������������������������������������������������� 54
Access����������������������������������������������������������������������������������������������������������������������������������� 54
Iteration��������������������������������������������������������������������������������������������������������������������������������������� 54
for (Variables; Condition; Modification)��������������������������������������������������������������������������������� 55
for ( in )���������������������������������������������������������������������������������������������������������������������������������� 56
for ( of )���������������������������������������������������������������������������������������������������������������������������������� 56
forEach( )�������������������������������������������������������������������������������������������������������������������������������� 56
Helper Functions������������������������������������������������������������������������������������������������������������������������� 57
.slice(begin,end)�������������������������������������������������������������������������������������������������������������������� 57
.splice(begin,size,element1,element2…)������������������������������������������������������������������������������ 58
.concat()��������������������������������������������������������������������������������������������������������������������������������� 59
.length Property��������������������������������������������������������������������������������������������������������������������� 59
Spread Operator�������������������������������������������������������������������������������������������������������������������� 60
Exercises������������������������������������������������������������������������������������������������������������������������������������� 60
JavaScript Functional Array Methods����������������������������������������������������������������������������������������� 67
Map��������������������������������������������������������������������������������������������������������������������������������������� 67
Filter�������������������������������������������������������������������������������������������������������������������������������������� 68
Reduce���������������������������������������������������������������������������������������������������������������������������������� 68
Multidimensional Arrays������������������������������������������������������������������������������������������������������������� 68
Exercises������������������������������������������������������������������������������������������������������������������������������������� 71
Summary������������������������������������������������������������������������������������������������������������������������������������ 81

vii
Table of Contents

Chapter 6: JavaScript Objects�������������������������������������������������������������������������������� 83


JavaScript Object Property��������������������������������������������������������������������������������������������������������� 83
Prototypal Inheritance����������������������������������������������������������������������������������������������������������������� 84
Constructor and Variables����������������������������������������������������������������������������������������������������������� 85
Summary������������������������������������������������������������������������������������������������������������������������������������ 86
Exercises������������������������������������������������������������������������������������������������������������������������������������� 87

Chapter 7: JavaScript Memory Management��������������������������������������������������������� 89


Memory Leaks���������������������������������������������������������������������������������������������������������������������������� 89
Reference to an Object���������������������������������������������������������������������������������������������������������� 89
Leaking DOM������������������������������������������������������������������������������������������������������������������������� 90
Global window Object������������������������������������������������������������������������������������������������������������ 91
Limiting Object References��������������������������������������������������������������������������������������������������� 92
The delete Operator��������������������������������������������������������������������������������������������������������������� 92
Summary������������������������������������������������������������������������������������������������������������������������������������ 93
Exercises������������������������������������������������������������������������������������������������������������������������������������� 93

Chapter 8: Recursion���������������������������������������������������������������������������������������������� 99
Introducing Recursion����������������������������������������������������������������������������������������������������������������� 99
Rules of Recursion�������������������������������������������������������������������������������������������������������������������� 100
Base Case���������������������������������������������������������������������������������������������������������������������������� 100
Divide-and-Conquer Method����������������������������������������������������������������������������������������������� 101
Classic Example: Fibonacci Sequence�������������������������������������������������������������������������������� 101
Fibonacci Sequence: Tail Recursion������������������������������������������������������������������������������������ 102
Pascal’s Triangle������������������������������������������������������������������������������������������������������������������ 103
Big-O for Recursion������������������������������������������������������������������������������������������������������������������� 105
Recurrence Relations���������������������������������������������������������������������������������������������������������� 105
Master Theorem������������������������������������������������������������������������������������������������������������������ 106
Recursive Call Stack Memory��������������������������������������������������������������������������������������������������� 107
Summary���������������������������������������������������������������������������������������������������������������������������������� 109
Exercises����������������������������������������������������������������������������������������������������������������������������������� 109

viii
Table of Contents

Chapter 9: Sets����������������������������������������������������������������������������������������������������� 117


Introducing Sets������������������������������������������������������������������������������������������������������������������������ 117
Set Operations�������������������������������������������������������������������������������������������������������������������������� 117
Insertion������������������������������������������������������������������������������������������������������������������������������ 118
Deletion������������������������������������������������������������������������������������������������������������������������������� 118
Contains������������������������������������������������������������������������������������������������������������������������������� 118
Other Utility Functions�������������������������������������������������������������������������������������������������������������� 119
Intersection�������������������������������������������������������������������������������������������������������������������������� 119
isSuperSet��������������������������������������������������������������������������������������������������������������������������� 119
Union����������������������������������������������������������������������������������������������������������������������������������� 120
Difference���������������������������������������������������������������������������������������������������������������������������� 120
Summary���������������������������������������������������������������������������������������������������������������������������������� 121
Exercises����������������������������������������������������������������������������������������������������������������������������������� 122

Chapter 10: Searching and Sorting���������������������������������������������������������������������� 125


Searching���������������������������������������������������������������������������������������������������������������������������������� 125
Linear Search���������������������������������������������������������������������������������������������������������������������� 125
Binary Search���������������������������������������������������������������������������������������������������������������������� 127
Sorting�������������������������������������������������������������������������������������������������������������������������������������� 129
Bubble Sort�������������������������������������������������������������������������������������������������������������������������� 129
Selection Sort���������������������������������������������������������������������������������������������������������������������� 131
Insertion Sort����������������������������������������������������������������������������������������������������������������������� 132
Quicksort����������������������������������������������������������������������������������������������������������������������������� 134
Quickselect�������������������������������������������������������������������������������������������������������������������������� 137
Mergesort���������������������������������������������������������������������������������������������������������������������������� 138
Count Sort���������������������������������������������������������������������������������������������������������������������������� 140
JavaScript’s Built-in Sort����������������������������������������������������������������������������������������������������� 141
Summary���������������������������������������������������������������������������������������������������������������������������������� 142
Exercises����������������������������������������������������������������������������������������������������������������������������������� 143

ix
Table of Contents

Chapter 11: Hash Tables��������������������������������������������������������������������������������������� 151


Introducing Hash Tables������������������������������������������������������������������������������������������������������������ 151
Hashing Techniques������������������������������������������������������������������������������������������������������������������ 152
Prime Number Hashing������������������������������������������������������������������������������������������������������� 152
Probing�������������������������������������������������������������������������������������������������������������������������������� 154
Rehashing/Double-Hashing������������������������������������������������������������������������������������������������� 155
Hash Table Implementation������������������������������������������������������������������������������������������������������� 156
Using Linear Probing����������������������������������������������������������������������������������������������������������� 156
Using Quadratic Probing������������������������������������������������������������������������������������������������������ 158
Using Double-Hashing with Linear Probing������������������������������������������������������������������������� 160
Summary���������������������������������������������������������������������������������������������������������������������������������� 161

Chapter 12: Stacks and Queues���������������������������������������������������������������������������� 163


Stacks��������������������������������������������������������������������������������������������������������������������������������������� 163
Peek������������������������������������������������������������������������������������������������������������������������������������� 165
Insertion������������������������������������������������������������������������������������������������������������������������������ 165
Deletion������������������������������������������������������������������������������������������������������������������������������� 166
Access��������������������������������������������������������������������������������������������������������������������������������� 166
Search��������������������������������������������������������������������������������������������������������������������������������� 167
Queues�������������������������������������������������������������������������������������������������������������������������������������� 167
Peek������������������������������������������������������������������������������������������������������������������������������������� 169
Insertion������������������������������������������������������������������������������������������������������������������������������ 169
Deletion������������������������������������������������������������������������������������������������������������������������������� 169
Access��������������������������������������������������������������������������������������������������������������������������������� 170
Search��������������������������������������������������������������������������������������������������������������������������������� 171
Summary���������������������������������������������������������������������������������������������������������������������������������� 171
Exercises����������������������������������������������������������������������������������������������������������������������������������� 172

Chapter 13: Linked Lists��������������������������������������������������������������������������������������� 179


Singly Linked Lists�������������������������������������������������������������������������������������������������������������������� 179
Insertion������������������������������������������������������������������������������������������������������������������������������ 180
Deletion by Value����������������������������������������������������������������������������������������������������������������� 181

x
Table of Contents

Deletion at the Head������������������������������������������������������������������������������������������������������������ 182


Search��������������������������������������������������������������������������������������������������������������������������������� 183
Doubly Linked Lists������������������������������������������������������������������������������������������������������������������� 184
Insertion at the Head����������������������������������������������������������������������������������������������������������� 185
Insertion at the Tail�������������������������������������������������������������������������������������������������������������� 185
Deletion at the Head������������������������������������������������������������������������������������������������������������ 186
Deletion at the Tail��������������������������������������������������������������������������������������������������������������� 187
Search��������������������������������������������������������������������������������������������������������������������������������� 188
Summary���������������������������������������������������������������������������������������������������������������������������������� 189
Exercises����������������������������������������������������������������������������������������������������������������������������������� 190

Chapter 14: Caching��������������������������������������������������������������������������������������������� 193


Understanding Caching������������������������������������������������������������������������������������������������������������� 193
Least Frequently Used Caching������������������������������������������������������������������������������������������������� 194
Least Recently Used Caching���������������������������������������������������������������������������������������������������� 199
Summary���������������������������������������������������������������������������������������������������������������������������������� 203

Chapter 15: Trees�������������������������������������������������������������������������������������������������� 205


General Tree Structure�������������������������������������������������������������������������������������������������������������� 205
Binary Trees������������������������������������������������������������������������������������������������������������������������������ 206
Tree Traversal���������������������������������������������������������������������������������������������������������������������������� 207
Pre-order Traversal�������������������������������������������������������������������������������������������������������������� 207
In-Order Traversal���������������������������������������������������������������������������������������������������������������� 209
Post-order Traversal������������������������������������������������������������������������������������������������������������ 211
Level-Order Traversal���������������������������������������������������������������������������������������������������������� 212
Tree Traversal Summary������������������������������������������������������������������������������������������������������ 214
Binary Search Trees������������������������������������������������������������������������������������������������������������������ 214
Insertion������������������������������������������������������������������������������������������������������������������������������ 216
Deletion������������������������������������������������������������������������������������������������������������������������������� 218
Search��������������������������������������������������������������������������������������������������������������������������������� 220

xi
Table of Contents

AVL Trees����������������������������������������������������������������������������������������������������������������������������������� 221


Single Rotation�������������������������������������������������������������������������������������������������������������������� 221
Double Rotation������������������������������������������������������������������������������������������������������������������� 225
Balancing the Tree��������������������������������������������������������������������������������������������������������������� 228
Insertion������������������������������������������������������������������������������������������������������������������������������ 229
Putting It All Together: AVL Tree Example����������������������������������������������������������������������������� 231
Summary���������������������������������������������������������������������������������������������������������������������������������� 234
Exercises����������������������������������������������������������������������������������������������������������������������������������� 234

Chapter 16: Heaps������������������������������������������������������������������������������������������������ 245


Understanding Heaps���������������������������������������������������������������������������������������������������������������� 245
Max-Heap���������������������������������������������������������������������������������������������������������������������������� 246
Min-Heap����������������������������������������������������������������������������������������������������������������������������� 247
Binary Heap Array Index Structure�������������������������������������������������������������������������������������������� 248
Percolation: Bubbling Up and Down������������������������������������������������������������������������������������ 250
Implementing Percolation��������������������������������������������������������������������������������������������������� 253
Max-Heap Example������������������������������������������������������������������������������������������������������������� 254
Min-Heap Complete Implementation���������������������������������������������������������������������������������������� 258
Max-Heap Complete Implementation��������������������������������������������������������������������������������������� 259
Heap Sort���������������������������������������������������������������������������������������������������������������������������������� 261
Ascending-Order Sort (Min-Heap)��������������������������������������������������������������������������������������� 261
Descending-Order Sort (Max-Heap)������������������������������������������������������������������������������������ 264
Summary���������������������������������������������������������������������������������������������������������������������������������� 267
Exercises����������������������������������������������������������������������������������������������������������������������������������� 268

Chapter 17: Graphs����������������������������������������������������������������������������������������������� 273


Graph Basics����������������������������������������������������������������������������������������������������������������������������� 273
Undirected Graphs�������������������������������������������������������������������������������������������������������������������� 277
Adding Edges and Vertices�������������������������������������������������������������������������������������������������� 279
Removing Edges and Vertices��������������������������������������������������������������������������������������������� 280
Directed Graphs������������������������������������������������������������������������������������������������������������������������ 282

xii
Table of Contents

Graph Traversal������������������������������������������������������������������������������������������������������������������������� 285


Breadth-First Search����������������������������������������������������������������������������������������������������������� 286
Depth-First Search�������������������������������������������������������������������������������������������������������������� 289
Weighted Graphs and Shortest Path����������������������������������������������������������������������������������������� 293
Graphs with Weighted Edges����������������������������������������������������������������������������������������������� 293
Dijkstra’s Algorithm: Shortest Path�������������������������������������������������������������������������������������� 294
Topological Sort������������������������������������������������������������������������������������������������������������������������ 298
Summary���������������������������������������������������������������������������������������������������������������������������������� 300

Chapter 18: Advanced Strings������������������������������������������������������������������������������ 303


Trie (Prefix Tree)������������������������������������������������������������������������������������������������������������������������ 303
Boyer–Moore String Search������������������������������������������������������������������������������������������������������ 307
Knuth–Morris–Pratt String Search�������������������������������������������������������������������������������������������� 311
Rabin–Karp Search������������������������������������������������������������������������������������������������������������������� 316
The Rabin Fingerprint���������������������������������������������������������������������������������������������������������� 316
Applications in Real Life������������������������������������������������������������������������������������������������������ 319
Summary���������������������������������������������������������������������������������������������������������������������������������� 320

Chapter 19: Dynamic Programming��������������������������������������������������������������������� 321


Motivations for Dynamic Programming������������������������������������������������������������������������������������ 321
Rules of Dynamic Programming����������������������������������������������������������������������������������������������� 323
Overlapping Subproblems��������������������������������������������������������������������������������������������������� 323
Optimal Substructure���������������������������������������������������������������������������������������������������������� 323
Example: Ways to Cover Steps�������������������������������������������������������������������������������������������� 323
Classical Dynamic Programming Examples������������������������������������������������������������������������������ 325
The Knapsack Problem�������������������������������������������������������������������������������������������������������� 325
Longest Common Subsequence������������������������������������������������������������������������������������������ 328
Coin Change������������������������������������������������������������������������������������������������������������������������ 330
Edit (Levenshtein) Distance������������������������������������������������������������������������������������������������� 334
Summary���������������������������������������������������������������������������������������������������������������������������������� 338

xiii
Table of Contents

Chapter 20: Bit Manipulation�������������������������������������������������������������������������������� 339


Bitwise Operators��������������������������������������������������������������������������������������������������������������������� 339
AND�������������������������������������������������������������������������������������������������������������������������������������� 340
OR���������������������������������������������������������������������������������������������������������������������������������������� 340
XOR�������������������������������������������������������������������������������������������������������������������������������������� 341
NOT�������������������������������������������������������������������������������������������������������������������������������������� 341
Left Shift������������������������������������������������������������������������������������������������������������������������������ 342
Right Shift���������������������������������������������������������������������������������������������������������������������������� 342
Zero-Fill Right Shift������������������������������������������������������������������������������������������������������������� 343
Number Operations������������������������������������������������������������������������������������������������������������������� 343
Addition������������������������������������������������������������������������������������������������������������������������������� 343
Subtraction�������������������������������������������������������������������������������������������������������������������������� 344
Multiplication����������������������������������������������������������������������������������������������������������������������� 345
Division�������������������������������������������������������������������������������������������������������������������������������� 347
Summary���������������������������������������������������������������������������������������������������������������������������������� 349

Index��������������������������������������������������������������������������������������������������������������������� 351

xiv
About the Author
Sammie Bae is a data engineer at Yelp and previously
worked for the data platform engineering team at
NVIDIA. He developed a deep interest in JavaScript
during an internship at SMART Technologies (acquired by
Foxconn), where he developed Node.js-based JavaScript
APIs for serial port communication between electronic
board drivers and a web application. Despite how relevant
JavaScript is to the modern software engineering industry,
currently no books besides this one teach algorithms and
data structures using JavaScript. Sammie understands how
difficult these computer science concepts are and aims to
provide clear and concise explanations in this book.

xv
Other documents randomly have
different content
The Project Gutenberg eBook of Charles Stewart
Parnell: His Love Story and Political Life
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Charles Stewart Parnell: His Love Story and Political Life

Author: Kitty O'Shea

Release date: January 9, 2020 [eBook #60895]


Most recently updated: October 17, 2024

Language: English

Credits: Produced by Al Haines

*** START OF THE PROJECT GUTENBERG EBOOK CHARLES


STEWART PARNELL: HIS LOVE STORY AND POLITICAL LIFE ***
CHARLES STEWART PARNELL
Taken in the sitting-room at Wonersh Lodge, Eltham
by Mrs. Parnell
CHARLES STEWART PARNELL
His Love Story and Political Life
BY

KATHARINE O'SHEA
(Mrs. Charles Stewart Parnell)

"No common soul was his; for good or ill


There was a mighty power"
HAWKSHAW—Sonnet IX

CASSELL AND COMPANY, LTD


London, New York, Toronto and Melbourne
1921

First published in Two Volumes 1914


One Volume Edition 1921
DEDICATED TO
LOVE
Had the whole rich world been in my power,
I should have singled out thee, only thee,
From the whole world's collected treasury."
MOORE

PUBLISHERS' NOTE

Of all the love stories in history possibly none had more intense reactions
upon politics than that of Charles Stewart Parnell and Katharine O'Shea,
which is unfolded with candour so compelling in this record of their life.

The engrossing interest in Ireland has demanded a new and popular


edition of Mrs. Parnell's book. No real comprehension of the Irish question
is possible without a thorough knowledge of Parnell's life and his part in
the creation of the modern Home Rule movement; and no intimate
knowledge of Parnell's character and the springs of his policy during the
critical decade of the 'eighties can be had without studying the revelations
of his correspondence with his wife.

In this edition some abridgment has been necessary to bring the book
within the compass of a single volume. The less material parts of Mrs.
Parnell's narrative of her own girlhood have been curtailed, and the long
correspondence of Captain O'Shea has been summarised in a note
appended to Chapter xxvii. One or two omissions are indicated in footnotes.
The text has been subject to no other interference.

La Belle Sauvage,
September, 1921.
MRS. PARNELL'S PREFACE TO THE FIRST EDITION

On October 6th, 1891, nearly twenty-three years ago, Charles Stewart


Parnell died in the arms of his wife; nearly twenty-three years ago the
whole of the civilized world awoke to laud—or to condemn—the dead
chief. It ranked him with the greatest heroes, or with the vilest sinners, of
the world, because he had found and kept the haven of her arms with
absolute disregard of that world's praise or blame, till death, the only power
greater than the love that held him there, tore him from them.

And then the hate that followed him to the grave turned to the woman he
had loved, to vent upon her its baffled spleen; not considering that such a
man as he would keep the heart of his wife as closely in death as he had
kept it in life, so closely that none could come near it, so secretly that none
could find the way to plant therein a sting. And so for these more than
twenty-two years, I, his wife, have lived upon memories so happy and so
precious that, after time had brought back some meaning to my life, I took a
certain pleasure in reading all men had to say of him whom they so little
knew. Never in all the "lives," "articles," or "appreciations" I read had there
been one that could say—or one that desired to say—that Parnell was not a
man who stands out sharp and clear from other men for good or ill.

But now, after all these years, one of Parnell's erstwhile followers has
arisen to explain to another generation that Parnell was not really such a
man as this, that he was one of Ireland's eternal failures. One who held her
dear indeed, but one who balanced her welfare against the clutches of a
light o' love with all the foolishness of callow degeneracy, so fondly
imagined chivalry by the weak. Not a man who gave his country his whole
life, and found the peace and courage of that life in the heart of the woman
he loved. No, that is how a man lives and loves, whether in secret or before
the whole world. That is how Parnell lived and loved, and now after these
long years I break my silence lest the unmanly echo of excuse given forth
by Mr. O'Brien in an age that loves excuse may cling about the name of the
man I loved. It is a very poignant pain to me to give to the world any
account of the sacred happiness of eleven years of my life and of the agony
of sorrow that once seemed too great to bear; but I have borne it, and I am
so near him now that I fear to leave near the name of that proud spirit the
taint of excuse that he loathed.

Parnell never posed as "rather the victim than the destroyer of a happy
home," as Mr. O'Brien suggested in the Cork Free Press of last year, and he
maintained to the last day of his life that he suffered no "dishonour and
discredit" in making the woman he loved his own.

And because Parnell contravened certain social laws, not regarding them
as binding him in any way, and because I joined him in this contravention
since his love made all else of no account to me, we did not shrink at the
clamour of the upholders of those outraged laws, nor resent the pressing of
the consequences that were inevitable and always foreseen. The freedom of
choice we had ourselves claimed we acknowledged for others, and were
wise enough to smile if, in some instances, the greatness of our offence was
loudly proclaimed by those who he knew lived in a freedom of love more
varied than our own. For the hypocrisy of those statesmen and politicians
who, knowing for ten years that Parnell was my lover, had with the readiest
tact and utmost courtesy accepted the fact as making a sure and safe
channel of communication with him, whom they knew as a force to be
placated; for those who, when the time came to stand by him in order to
give Ireland the benefits they had promised him for her, repudiated him
from under the cloak of the religion they thereby forswore, he, and I with
him, felt a contempt unspeakable.

In this book I am giving to the public letters so sacred to my lover and


myself that no eyes other than our own should ever have seen them, but that
my son was jealous for his father's honour, and that I would not my lover's
life should seem in these softer days a lesser thing, beset with fears and
indecisions that he did not know. I have, lived in those eleven years of
Parnell's love so constantly that nothing has been lost to me of them, and
the few details of them that I give will show a little of what manner of man
he was, while still I keep for my own heart so much that none shall ever
know but he and I.
In regard to the political aspect of the book those who know the Irish
history of those days will understand. My lover was the leader of a nation in
revolt, and, as I could, I helped him as "King's Messenger" to the
Government in office. It has been erroneously said by some of the Irish
Party that I "inspired" certain measures of his, and biased him in various
ways politically. Those who have said so did not know the man, for Parnell
was before all a statesman; absolutely convinced of his policy and of his
ability to carry that policy to its logical conclusion. Self-reliant and far-
seeing, the master of his own mind.

I was never a "political lady," and, apart from him, I have never felt the
slightest interest in politics, either Irish or English, and I can honestly say
that except for urging him to make terms with the Government in order to
obtain his liberation from prison, I did not once throughout those eleven
years attempt to use my influence over him to "bias" his public life or
politics; nor, being convinced that his opinions and measures were the only
ones worth consideration, was I even tempted to do so. In my many
interviews with Mr. Gladstone I was Parnell's messenger, and in all other
work I did for him it was understood on both sides that I worked for Parnell
alone.

KATHARINE PARNELL.

Brighton, April, 1914.

CONTENTS

CHAPTER

1. MY EARLY LIFE

2. VISITORS AT RIVENHALL

3. MY FATHER'S DEATH AND MY MARRIAGE


4. A DAY ON THE DOWNS

5. MORE FINANCIAL DIFFICULTIES

6. CAPTAIN O'SHEA ENTERS POLITICAL LIFE

7. MR. PARNELL AND THE IRISH PARTY

8. THE FIRST MEETING WITH MR. PARNELL

9. AT ELTHAM

10. THE LAND LEAGUE TRIALS

11. PARLIAMENTARY ASSOCIATIONS

12. HOBBIES AND A CHALLENGE

13. ASTRONOMY, "SEDITION," AND ARREST

14. KILMAINHAM DAYS

15. MORE KILMAINHAM LETTERS

16. THE "KILMAINHAM TREATY"

17. THE PHOENIX PARK MURDERS AND AFTER

18. ENVOY TO GLADSTONE

19. THE FIRST HOME RULE BILL

20. MR. PARNELL IN DANGER—FOUNDING OF NATIONAL


LEAGUE

21. A WINTER OF MEMORIES

22. HORSES AND DOGS

23. SEASIDE HOLIDAYS


24. LONDON REMEMBRANCES

25. THE PARNELL COMMISSION

26. BRIGHTON HAUNTS

27. THE DIVORCE CASE

28. A KING AT BAY

29. PARNELL AS I KNEW HIM

30. MARRIAGE, ILLNESS AND DEATH

INDEX

Charles Stewart Parnell

CHAPTER I
MY EARLY LIFE
"Go forth; and if it be o'er stoney way
Old Joy can lend what newer grief must borrow,
And it was sweet, and that was yesterday.
And sweet is sweet, though purchased with sorrow."
F. THOMPSON.
My father, Sir John Page Wood, was descended from the Woods of
Tiverton, and was the eldest of the three sons of Sir Matthew Wood,
Baronet, of Hatherley House, Gloucestershire. He was educated at
Winchester and at Trinity College, Cambridge, and after entering into holy
orders, before he was twenty-four years of age, was appointed private
chaplain and secretary to Queen Caroline, performing the last offices for her
at her death in 1820, and attending her body to its final resting-place in
Brunswick. He then became chaplain to the Duke of Sussex, and in 1824
was appointed by the Corporation of London to the rectory of St. Peter's,
Cornhill.

In 1820 my father married Emma Caroline, the youngest of the three


daughters of Admiral Michell (and my father's uncle, Benjamin Wood, M.P.
for Southwark at the time, married the second daughter, Maria, the "Aunt
Ben" of this book). She was eighteen. My father was still at Cambridge.
The improvident young pair found it difficult to live on the small allowance
that was considered sufficient for my father at college. They appear to have
been very happy notwithstanding their difficulties, which were augmented a
year later by the birth of a son; and while my father became "coach" to
young men of slower wit, my mother, who was extremely talented with her
brush, cheerfully turned her beautiful miniature painting to account for the
benefit of her young husband and son. She soon became an exhibitor of
larger works in London, and the brothers Finden engraved several of her
pictures.

She and my father seem to have idolized their first child, "Little John,"
and his early death, at about four years old, was their first real sorrow. The
boy was too precocious, and when he was three years old his proud young
parents were writing "he can read well now, and is getting on splendidly
with his Latin!"

Constable, the artist, was a friend of my mother's, who thought highly of


her work, and gave her much encouragement, and the young people seem to
have had no lack of friends in the world of art and letters. Of my mother,
Charles Sheridan said he "delighted in her sparkling sallies," and the young
Edwin Landseer was "mothered" by her to his "exceeding comfort."
My mother was appointed bedchamber woman to Queen Caroline, and
became very fond of her. The consort of George IV. appears to have taken
the greatest interest in "Little John," and I had until a short time ago—when
it was stolen—a little workbox containing a half-finished sock the Queen
was knitting for the little boy when her fatal illness began.

My parents then lived in London for some years while my father did
duty at St. Peter's. In 1832 my father became vicar of Cressing, in Essex,
and he took my mother and their (I think three) children there, leaving a
curate in charge of St. Peter's. Thirteen children in all were born to my
parents (of whom I was the thirteenth), and of my brothers and sisters there
were seven living at the time of my birth.

There was little room for all these young people in the vicarage at
Cressing, and it was so extremely damp as to be unhealthy; so my parents
moved to Glazenwood, a charming house with the most beautiful gardens I
have ever seen in a place of moderate size. I think my brother Fred died
here; but my first memories are of Rivenhall, where my parents moved soon
after my birth. Rivenhall Place belonged to a friend of my father's, Sir
Thomas Sutton Weston, of Felix Hall. The beautiful old place was a
paradise for growing children, and the space and beauty of this home of my
youth left me with a sad distaste for the little houses of many conveniences
that it has been my lot to inhabit for the greater part of my life.

In politics my father was a thoroughgoing Whig, and as he was an able


and fluent speaker, and absolutely fearless in his utterances, he became a
great influence in the county during election times. I remember, when he
was to speak at a political meeting, how he laughed as he tied me up in
enormous orange ribbons and made me drive him there, and how
immensely proud of him I was (though, of course, I could not understand a
word of it all) as he spoke so persuasively that howls and ribald cries turned
to cheers for "Sir John's man."

When he went to London to "take duty" at St. Peter's Cornhill, he and I


used to stay at the Green Dragon, Bishopsgate Street. There was a beautiful
old courtyard to this hotel with a balcony, overhung with creepers, running
all round the upper rooms. I loved this place, and when I was too young to
care much for the long service and sermons, I was quite content that my
father should tuck me up safely in bed before going to evensong at St.
Peter's.

Sometimes I was not well enough to go to London with him, and on


these occasions comforted myself as much as possible with a compensating
interest in the habits of the Rev. Thomas Grosse, who took my father's place
at Cressing. He was very good and kind to me, and in the summer evenings,
when he knew I was missing my father, he would take me out to look for
glow-worms, and show me the stars, teaching me the names of the planets.
Years afterwards the knowledge I thus gained became a great happiness to
me, as I taught Mr. Parnell all I knew of astronomy, and opened up to him a
new world of absorbing interest.

Friends of my brother Evelyn frequently stayed at Rivenhall, and one of


them, a colonel of Light Dragoons, was engaged to one of my elder sisters.
This gentleman appealed to my youthful mind as being all that a hero
should be, and I used to stick a red fez on my golden curls and gallop my
pony past the dining-room windows so that he might see and admire the
intrepid maiden, as the prince in my fairy book did!

I loved the winter evenings at Rivenhall when my brothers were not at


home. My father used to sit by the fire reading his Times, with his great
white cat on his knee, while I made his tea and hot buttered toast, and my
mother and sister Anna read or sketched. I used to write the plots of tragic
little stories which my "Pip"[1] used to read and call "blood-stained
bandits," owing to the violent action and the disregard of convention shown
by all the characters concerned.

However, these childish efforts of mine led to greater results, as one


evening my mother and sister laughingly offered to buy my "plot" in order
to "write it up" into a novel. I was, of course, very proud to sell my idea,
and thenceforth both my mother and sister wrote many successful novels,
published by Chapman and Hall—and, I believe, at prices that are rarely
realized by present-day novelists.

I was thus the unwitting means of greatly relieving my parents' anxiety


of how to meet, with their not very large income, the heavy expense of
educating and maintaining my brothers, and the responsibilities of their
position.

My brothers loved to tease me, and, as I was so much younger than they,
I never understood if they were really serious or only laughing at me.
Evelyn was specially adroit in bewildering me, and used to curb my
rebellion, when I was reluctant to fetch and carry for him, by drawing a
harrowing picture of my remorse should he be killed "in the next war." The
horror of this thought kept me a ready slave for years, till one day, in a gust
of temper, I burst out with: "I shan't be sorry at all when you're killed in a
war cos' I didn't find your silly things, and I wish you'd go away and be a
dead hero now, so there!" I remember the horrified pause of my mother and
sister and then the howl of laughter and applause from Evelyn and Charlie.
Evelyn was very good to me after this, and considered, more, that even little
girls have their feelings.

As a matter of fact, my mother was so entirely wrapped up in Evelyn


that I think I was jealous, even though I had my father so much to myself.
My mother was most affectionate to all her children, but Evelyn was her
idol, and from the time when, as a mere lad, he was wounded in the
Crimean War, to the day of her death, he was first in all her thoughts.

Of my brothers and sisters I really knew only four at all well. Clarissa
had died at seventeen, and Fred when I was very young; Frank was away
with his regiment, my sister Pollie was married and away in India before I
was born, and my sister Emma married Sir Thomas Barrett-Lennard while I
was still very young. She was always very kind to me, and I used to love
going to visit her at her house in Brighton. Visiting Sir Thomas Barrett-
Lennard's country seat, Belhus, I did not like so much, because, though
Belhus is very beautiful, I loved Rivenhall better.

My mother was a fine musician, and as I grew older, I began to long to


play as she did. There was a beautiful grand piano in the drawing-room, and
I used to try to pick out tunes upon it. My mother had spent much money on
her eldest daughter's—Maria's (Pollie)—musical education. At the end of
this Pollie said she detested it, and would never play a note again if she
could help it. When I asked that I might be taught to play my mother said,
"No. There is the piano; go and play it if you really want to learn." In time I
could play very well by ear, and began to compose a little and seek for
wider knowledge. My love of music led me to try composition, and I used
to set to music any verses that took my fancy. Among these I was much
pleased with Longfellow's "Weariness," and was so encouraged by my
mother's praise of the setting that I sent the poet a copy. I was a very happy
girl when he wrote to thank me, saying that mine was the best setting of his
poem he had ever heard.

Armed with the manuscript of this music and some others, the next time
I went to London with my father I went to Boosey's, the musical publishers,
and asked their representative to publish them.

"Quite impossible, my dear young lady," he answered at once. "We never


take beginners' work!" I plaintively remarked that even Mozart was a
"beginner" once, and could not understand why he laughed. Still, with a
smile, he consented to look at the manuscript, and to my joy he ceased to
laugh at me and tried some of it over, finally agreeing, much to my joy, to
publish "Weariness" and a couple of other songs.

I remember my father's pleasure and the merry twinkle in his eye as he


gravely assented to my suggestion that we were a very gifted family!

While my brother Frank (who was in the 17th Foot) was stationed at
Aldershot he invited my sister Anna and myself down to see a review. He
was married, and we stayed with him and his wife and children in the
married officers' quarters, which appeared to us to be very gay and
amusing.

I greatly enjoyed seeing the cavalry, with all the officers and men in full
dress.

Many of the officers came over to call after the review, and among them
was Willie O'Shea, who was then a cornet in the 18th Hussars. There was a
small drama acted by the officers in the evening which my brother's wife
took us to see, and there were many of the 18th Hussars, who paid us much
attention, though, personally, I found the elderly and hawk-eyed colonel of
the regiment far more interesting than the younger men.
[1] Sir John.

CHAPTER II
VISITORS AT RIVENHALL
"A chiel's amang you takin' notes,
And, faith, he'll prent it!"—BURNS.

Among other visitors to Rivenhall was Lieut.-Colonel Steele, of the


Lancers, a dark, handsome man, who married my sister Anna.

I remember looking at Anna consideringly when I was told this was to


be, for, as children do, I had hitherto merely regarded Anna as a sister too
"grown-up" to play with on equal terms, and yet not as a person sufficiently
interesting to be married to one of the magnificent beings who, like
Evelyn's friends, wore such beautiful uniforms and jingly spurs. But my
sister had soft brown hair and a lovely skin, blue eyes that were mocking,
gay, or tender in response to many moods, and a very pretty figure. And I
solemnly decided that she was really pretty, and quite "grown-up" enough
to be loved by the "beautiful ones."

Anthony Trollope was a great friend of my father and mother, and used
to stay with us a good deal for hunting. He was a very hard rider to hounds,
and was a cause of great anxiety to my mother, for my sister Anna loved an
intrepid "lead" out hunting, and delighted in following Trollope, who stuck
at nothing. I used to rejoice in his "The Small House at Allington," and go
about fitting the characters in the book to the people about me—a mode of
amusement that palled considerably on the victims.
I was always glad when our young cousin George (afterwards Sir
George) Farwell (Lord Justice Farwell) came to see us. A dear lad, who
quite won my childish admiration with his courtly manners and kind,
considerate ways.

The Hon. Grantley-Barkley (who was seventy, I believe) was a dear old
man who was very fond of me—as I was of him. I was but a child when he
informed my parents that he wished to marry me when I was old enough!
He was a dear friend of my father's, but, though the latter would not
consider the matter seriously, my mother, who was an extraordinarily
sympathetic woman, encouraged the idea.

Grantley-Barkley was always called the "Deer-slayer" by his friends. A


fine old sportsman, his house, "The Hut," at Poole, Dorset, was a veritable
museum of slain beasts, and I used to shudder secretly at the idea of
becoming mistress of so many heads and horns.

The dear old man used to write long letters to me before I could answer
them in anything but laborious print, and he wrote sheets to my mother
inquiring of my welfare and the direction of my education. I still have many
of the verses he composed in my honour, and though the last line of the
verse that I insert worries me now as much as it did when I received it, so
many years ago, I still think it very pretty sentiment:
"Then the Bird that above me is singing
Shall chase the thought that is drear,
When the soul to her side it is winging
The limbs must be lingering near!"

This little one-sided romance died a natural death as I grew up, my old
friend continuing to take the kindest interest in me, but accepting the fact
that I was no exception to the law of youth that calls to youth in mating.

My brother Frank suggested to my brother-in-law, Sir Thomas Barrett-


Lennard, that Willie O'Shea, who was a first-class steeplechase rider, would
no doubt, if asked, ride the horse Honesty that Tom was going to run in the
Brentwood Steeplechase. He had already ridden and won many races.
Willie readily agreed to ride, and came to stay at Belhus for the race.

I was staying there at the time, and though I was considered too young to
be really "out," as a rule I had my share in any festivities that were going
on. I remember my brother-in-law saying casually to my sister Emma, who
was giving a dinner party that evening: "Who is Katie to go in with,
milady?" and she answered promptly, "Oh, she shall go in with O'Shea." A
mild witticism that rather ruffled my youthful sense of importance.

My first sight of Willie then, as a grown-up, was on this evening, when I


came rather late into the hall before dressing for dinner. He was standing
near the fire, talking, with the eagerness that was not in those days bad form
in young men, of the steeplechase he had ridden and won on Early Bird.

I had been so much the companion of older men than he that I was
pleased with his youthful looks and vivacity. His dress pleased me also,
and, though it would appear a terrible affair in the eyes of a modern young
man, it was perfectly correct then for a young officer in the 18th Hussars,
and extremely becoming to Willie: a brown velvet coat, cut rather fully,
sealskin waistcoat, black-and-white check trousers, and an enormous
carbuncle and diamond pin in his curiously folded scarf.

When introduced to me he was most condescending, and nettled me so


much by his kindly patronage of my youthfulness that I promptly plunged
into such a discussion of literary complexities, absorbed from my elders and
utterly undigested, and he soon subsided into a bewildered and shocked
silence.

However, in the few days of that visit we became very good friends, and
I was immensely pleased when, on parting, Willie presented me with a
really charming little poem written about my "golden hair and witsome
speech."

Of course, as usual, I flew to show my father, who, reading, sighed, "Ah,


too young for such nonsense. I want my Pippin for myself for years to
come."[1]
In the summer at Belhus I met Willie again. Unconsciously we seemed
to drift together in the long summer days. The rest of the household intent
on their own affairs, we were content to be left together to explore the cool
depths of the glades, where the fallow deer ran before us, or the kitchen
garden, where the high walls were covered with rose-coloured peaches,
warm with the sun as we ate them. What we talked about I cannot
remember, but it was nothing very wise I should imagine.

Week after week went by in our trance of contentment. I did not look
forward, but was content to exist in the languorous summer heat—dreaming
through the sunny days with Willie by my side, and thinking not at all of the
future. I suppose my elders were content with the situation, as they must
have known that such propinquity could have but one ending.

There was a man by whom I was attracted and who had paid me
considerable attention—E.S., stationed at Purfleet. He was a fine athlete,
and used to fill me with admiration by jumping over my pony's back
without touching him at all. I sometimes thought idly of him during these
days with Willie, but was content to drift along, until one day my sister
asked me to drive over with a note of invitation to dinner for the officers at
Purfleet.

In the cool of the evening I set out, with Willie, of course, in attendance.
Willie, on arrival, sprang out of the pony cart to deliver the note, and as he
was jumping in again glanced up at the window above us, where it
happened E. S. and another officer were standing. Without a moment's
hesitation Willie leant forward and kissed me full on the lips. Furious and
crimson with the knowledge that the men at the window had seen him kiss
me, I hustled my poor little pony home, vowing I would never speak to
Willie again; but his apologies and explanation that he had only just wanted
"to show those fellows that they must not make asses of themselves"
seemed so funny and in keeping with the dreamy sense I had of belonging
to Willie that I soon forgave him, though I felt a little stab of regret when I
found that E. S. declined the invitation to dinner. He never came again.

Willie had now to rejoin his regiment, and in the evening before his
going, as I was leaving the drawing-room, he stopped to offer me a rose,
kissing me on the face and hair as he did so.
A few mornings after I was sleeping the dreamless sleep of healthy
girlhood when I was awakened by feeling a thick letter laid on my cheek
and my mother leaning over me singing "Kathleen Mavourneen" in her rich
contralto voice. I am afraid I was decidedly cross at having been awakened
so suddenly, and, clasping my letter unopened, again subsided into slumber.

So far nearly all my personal communication with Willie when he was


away had been carried on by telegraph, and I had not quite arrived at
knowing what to reply to the sheets of poetic prose which flowed from his
pen. Very frequently he came down just for a day to Rivenhall, and I drove
to meet him at the station with my pony-chaise. Then we used to pass long
hours at the lake fishing for pike, or talking to my father, who was always
cheered by his society.

At this time Colonel Clive, of the Grenadier Guards, was a frequent


visitor. I was really fond of him, and he pleased me by his pleasure in
hearing me sing to my own accompaniment. I spent some happy hours in
doing so for him when staying at Claridge's Hotel with my sister, and I
remember that when I knew he was coming I used to twist a blue ribbon in
my hair to please him.

Once, when staying at Claridge's, my sister and I went to his rooms to


see the sketches of a friend of my brother Evelyn's, Mr. Hozier, the clever
newspaper correspondent, afterwards Sir H. Hozier, and father of Mrs.
Winston Churchill. The drawings were, I believe, very clever, and I know
the tea was delicious.

It was some time after this that the 18th Hussars were stationed at
Brighton. Willie loved early morning gallops on the Downs, and, on one
occasion, he rode off soon after daybreak on his steeplechaser, Early Bird,
for a gallop on the race-course. At the early parade that morning Willie was
missing, and, as inquiries were being made as to his whereabouts, a trooper
reported that Early Bird had just been brought in dead lame, and bleeding
profusely from a gash in the chest.

He had been found limping his way down the hill from the race-course.
Willie's brother officers immediately set out to look for him, and found him
lying unconscious some twenty yards from a chain across the course which
was covered with blood, and evidently the cause of the mishap. They got
him down to the barracks on a stretcher, and there he lay with broken ribs
and concussion of the brain.

He told us afterwards that he was going at a hard gallop, and neither he


nor Early Bird had seen the chain till they were right on it, too late to jump.
There had never been a chain up before, and he had galloped over the same
course on the previous morning.

I was at Rivenhall when I heard of the accident to Willie, and for six
unhappy weeks I did little else than watch for news of him. My sister, Lady
Barrett-Lennard, and Sir Thomas had gone to Preston Barracks to nurse
him, and as soon as it was possible they moved him to their own house in
Brighton. For six weeks he lay unconscious, and then at last the good news
came that he was better, and that they were going to take him to Belhus to
convalesce.

A great friend of Willie's, also in the 18th—Robert Cunninghame


Graham—was invited down to keep him amused, and my sister, Mrs.
Steele, and I met them in London and went down to Belhus with them.
Willie was looking very ill, and was tenderly cared for by his friend
Graham. He was too weak to speak, but, while driving to Belhus, he slipped
a ring from his finger on to mine and pressed my hand under cover of the
rugs.

Robert Cunninghame Graham, uncle of Robert Bontine Cunninghame


Graham, the Socialist writer and traveller, walked straight into our hearts,
so gay, so careful of Willie was he, and so utterly bon camarade, that we
seemed to have known him for years. In a few days Anna and I left Belhus,
and Willie's father came over from Ireland to stay with him till he was
completely recovered.

Before Willie left I was back at Belhus on the occasion of a dinner party,
and was shyly glad to meet him again and at his desire to talk to me only.

While the others were all occupied singing and talking after dinner we
sat on the yellow damask sofa, and he slipped a gold and turquoise locket
on a long gold and blue enamel chain round my neck. It was a lovely thing,
and I was very happy to know how much Willie cared for me.

[1] Captain O'Shea's family, the O'Sheas of Limerick, were a collateral


branch of the O'Sheas of County Kerry. William O'Shea had three sons,
Henry, John and Thaddeus, of whom the first named was Captain
O'Shea's father. John went to Spain (where a branch of the family had
been settled since 1641, and become the Duges of Sanlucas), founded a
bank and prospered. Henry found the family estate (Rich Hill) heavily
mortgaged, entered the law, and by hard work pulled the property out of
bankruptcy and made a fortune. He married Catherine Quinlan, daughter
of Edward Quinlan, of Tipperary, a Comtesse of Rome, and had two
children, Captain O'Shea and Mary, afterwards Lady of the Royal Order
of Theresa of Bavaria. The children had a cosmopolitan education, and
the son went into the 18th Hussars, a keen sporting regiment, where he
spent great sums of money. Finally, a bill for £15,000 coming in, his
father told him that his mother and sister would have to suffer if this rate
of expenditure continued. Captain O'Shea left the regiment just before
his marriage to Miss Wood. The Comtesse O'Shea was a highly educated
woman, assiduous in her practice of religion, but valetudinarian and
lacking a sense of humour. Mary O'Shea's education had left her French
in all her modes of thought and speech. Both ladies disapproved of the
engagement between Captain O'Shea and Miss Wood.

CHAPTER III
MY FATHER'S DEATH AND MY MARRIAGE
"Fair shine the day on the house with open door;
Birds come and cry there and twitter in the chimney,
But I go for ever and come again no more."
—STEVENSON.
The following autumn my father, mother, and I went to stay at Belhus on
a long visit, my father going to Cressing each week for the Sunday duty,
and returning to us on Monday morning.

We all enjoyed spending Christmas at Belhus. My mother and my sister


Emma were devoted to one another, and loved being together. We were a
much larger party also at Belhus, and there were so many visitors coming
and going that I felt it was all more cheerful than being at home.

Among other visitors that winter, I well remember Mr. John Morley—
now Lord Morley—as he was told off for me to entertain during the day. He
was a very brilliant young man, and my elders explained to me that his
tense intellect kept them at too great a strain for pleasurable conversation.
"You, dear Katie, don't matter, as no one expects you to know anything!"
remarked my sister with cheerful kindness. So I calmly invited John Morley
to walk with me, and, as we paced through the park from one lodge to the
other, my companion talked to me so easily and readily that I forgot my rôle
of "fool of the family," and responded most intelligently to a really very
interesting conversation.

With the ready tact of the really clever, he could already adapt himself to
great or small, and finding me simply ready to be interested, was most
interesting, and I returned to my family happily conscious that I could now
afford to ignore my brother Evelyn's advice to "look lovely and keep your
mouth shut!"

John Morley, so far as I remember him then, was a very slight young
man with a hard, keen face, the features strongly marked, and fair hair. He
had (to me) a kindly manner, and did not consider it beneath him to talk
seriously to a girl so young in knowledge, so excessively and shyly
conscious of his superiority, and so much awed by my mission of keeping
him amused and interested while my elders rested from his somewhat
oppressive intellectuality. I remember wondering, in some alarm, as to what
topic I should start if he suddenly stopped talking. But my fear was entirely
groundless; he passed so easily from one thing interesting to me to another
that I forgot to be self-conscious, and we discussed horses and dogs, books
and their writers—agreeing that authors were, of all men, the most
disappointing in appearance—my father, soldiers, and "going to London,"
with the greatest pleasure and mutual self-confidence. And I think that, after
that enlightening talk, had I been told that in after years this suave, clever
young man was to become—as Gladstone's lieutenant—one of my bitterest
foes, I should perhaps have been interested, but utterly unalarmed, for I had
in this little episode lost all awe of cleverness as such.

My father died in February, 1866. The vexed question of ways and


means—always a vexed question in a clergyman's household when the head
of the house dies—pressed heavily on my mother, who was left almost
penniless by my father's death.

My mother and sisters were discussing what was best to be done, and my
mother was speaking sadly as I went into her room. "We must sell the cow,
and, of course, the pig," my eldest sister (Emma) replied in her sweet,
cheerful voice, which produced a little laugh, though a rather dismal one,
and our sorrow was chased away for the moment.

My mother's sister, Mrs. Benjamin Wood, on hearing of her troubles,


settled a yearly income on her, thus saving her from all future anxiety, most
of her children being provided for under our grandfather's—old Sir
Matthew Wood's—will.

During that year we lived chiefly at Rivenhall. It was a very quiet, sad
year, but we had a few pleasant visitors. Sir George Dasent, of the Times,
and also Mr. Dallas, who wrote leading articles for the same paper, were
frequent visitors, and Mr. Chapman (of Chapman and Hall, publishers),
with pretty Mrs. Chapman, Mr. Lewes, and many other literary people were
very welcome guests. My mother and sister Anna (Mrs. Steele) were
writing books, and much interested in all things literary. At the end of the
year we joined my eldest sister and her husband at Brighton, and soon after
this Willie returned from Spain and called on us at once, with the ever-
faithful Cunninghame Graham. I now yielded to Willie's protest at being
kept waiting longer, and we were married very quietly at Brighton on
January 25, 1867. I narrowly escaped being married to Mr. Cunninghame
Graham by mistake, as Willie and he—the "best man"—had got into wrong
positions. It was only Mr. Graham's horrified "No, no, no," when asked
whether he would have "this woman" to be his wife, that saved us from
many complications.
My mother, brothers and sisters gave me beautiful presents, and my dear
sister Emma gave me my trousseau, while Willie himself gave me a gold-
mounted dressing-bag. My old Aunt H. sent me a gold and turquoise
bracelet. Willie saw this after I had shown him what my sister Mrs. Steele
had given me—a carbuncle locket with diamond centre. Aunt H. was a very
wealthy woman, my sister not at all well off, though in any case her present
would have been much more to me than that of Aunt H. However, Willie
merely remarked of Anna's gift: "That is lovely, darling, and this," taking up
Aunt H.'s bracelet, "this will do for the dog," snapped it round the neck of
my little Prince.

Long afterwards he and I went to call on Aunt H., and as usual I had
Prince under my arm. I noticed Aunt H. break off in a sentence, and fix a
surprised and indignant eye on my dog. I had forgotten all about Prince's
collar being Aunt H.'s bracelet, and only thought she did not like my
bringing the dog to call, till I caught Willie's eye. He had at once taken in
the situation, and became so convulsed with laughter that I hastily made my
adieu and hustled him off.

Sir Seymour Fitzgerald lent us Holbrook Hall for our honeymoon, a


kindness that proved unkind, as the pomp and ceremony entailed by a large
retinue of servants for our two selves were very wearisome to me. There
was little or no occupation for us, as the weather was too bad to get out
much; our kind host had naturally not lent us his hunters, and we were, or
Willie was, too much in awe of the conventions to ask anyone to come and
relieve our ennui. Indeed, I think that no two young people were ever more
rejoiced than we were when we could return to the life of the sane without
comment.

Willie had sold out of the army just before his marriage, and his Uncle
John, who had married a Spanish lady and settled in Madrid, offered Willie
a partnership in his bank, O'Shea and Co., if he would put the £4,000 he
received for his commission into it. This was too good an offer to be
refused, so I said good-bye to my people, and bought some little presents
for the servants at home, including a rich silk dress for my old nurse Lucy,
who had been in my mother's service since the age of sixteen, and who was
much upset that her youngest and dearest nursling should be taken away to
such "heathenish, far-off places."

Before leaving England Willie and I stayed for a few days in London,
and his mother and sister Mary called on us. They had not attended the
marriage, as they would not lend their countenance to a "mixed" marriage,
though once accomplished they accepted the situation. They were very nice
and kind, and so gently superior that at once I became politely antagonistic.
They brought me some beautiful Irish poplins which were made into gowns
to wear in Madrid to impress the Spanish cousins, and a magnificent
emerald bracelet, besides £200 worth of lovely Irish house-linen. My
mother-in-law and sister-in-law were most generous indeed, and I then, and
always, acknowledged them to be thoroughly good, kind-hearted women,
but so hidebound with what was to me bigotry, with conventionality and
tactlessness, that it was really a pain to me to be near them. They admired
me, and very plainly disapproved of me; I admired them for their Parisian
finish—(for want of a better term)—and for their undoubted goodness, but,
though I was rather fond of Mary, they wearied me to death.

That week we crossed over to Boulogne, and there we had to stay for a
few days, as I was too ill from the crossing to go farther. The second
morning Willie, seeing I was better, wanted to go out to déjeuner, and told
me to lie still in bed, and he would tell them to send a maid with my food,
as he knew that I, not being used to French customs, would not like a waiter
to bring it. To make sure of my not being disturbed he locked the door. To
my horror half an hour after he had gone there was a tap at the door, and a
manservant opened it with his key, and marched in, despite my agitated
protests in very home-made French. Once in, however, he made me so
comfortable by his deft arrangement of a most tempting meal and paternal
desire that "Madame should eat and recover herself," that I was able to
laugh at Willie's annoyance on his return to find the waiter once more in
possession and removing the tray.

We then went to Paris to stay with my mother-in-law and Mary for a few
days, while they found me a French maid and showed me the sights. I had a
great quantity of very long hair in those days, and Willie insisted on my
having it very elaborately dressed—much to my annoyance—in the latest
French fashion, which I did not consider becoming to me. My maid was
also much occupied in making the toilet of my little dog. He was a lovely
little creature, and Caroline would tie an enormous pale blue bow on him as
a reward for the painful business of combing him. From the time Willie
gave me this little dog to the day it died, about six years afterwards, it went
everywhere with me. He was as good and quiet as possible when with me,
but if I ever left him for a moment the shrill little howls would ring out till
the nearest person to him would snatch him up, and fly to restore him to his
affectionate, though long-suffering, mistress.

At Paris there was trouble with my mother-in-law and Mary at once


because of him. They took me to see Notre Dame, and as a matter of course
Prince was in my arm under my cloak. As we came out I let my little dog
down to run, and the Comtesse nearly fainted. "You took the dog into the
church! Oh, Katie, how wrong, how could, you! Mary! what shall we do?
Do you not think——?" and turning a reproachful glance on me, Mary
responded, "Come, mother," and, leaving me amazed and indignant on the
steps, they passed into Notre Dame again. With some curiosity I peeped in
after them, and beheld them kneeling at prayer just inside the door. They
came out almost at once, and the old Comtesse looked happier. "You did not
understand, dear," said Mary kindly, "it is better not to take the little dog
into a church." I was young enough to resent being told I did not
understand, and promptly returned, "I understand, Mary, that you and the
Comtesse consider it wicked to take Prince into Notre Dame. Well, I don't,
and you must excuse me if I remind you that God made the dog; and I seem
to remember something about a Child that was born in a stable with a lot of
nice friendly beasts about, so you need not have gone back to pray about me
and Prince, I think!" And, scooping up Prince, I stalked off with a dignity
that was rather spoilt by my not having sufficient French to find my own
way home, and having to wait at the carriage for them. We drove home with
much stiffness, and only thawed sufficiently to assure Willie how much we
had enjoyed ourselves!

While I was abroad I often used to get away by myself to spend many
happy hours in the beautiful churches with Prince tucked under my arm,
and often a friendly old priest would give us a smile as he passed on his
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!

ebookball.com

You might also like