Instant Access to JavaScript Data Structures and Algorithms: An Introduction to Understanding and Implementing Core Data Structure and Algorithm Fundamentals 1st Edition Sammie Bae ebook Full Chapters
Instant Access to JavaScript Data Structures and Algorithms: An Introduction to Understanding and Implementing Core Data Structure and Algorithm Fundamentals 1st Edition Sammie Bae ebook Full Chapters
com
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/the-networked-health-relevant-factors-
for-office-buildings-2nd-edition-werner-seiferlein-christine-kohlert/
ebookmeta.com
https://ebookmeta.com/product/2023-national-electrical-safety-
code-2023rd-edition-accredited-standards-committee/
ebookmeta.com
https://ebookmeta.com/product/the-language-of-political-incorporation-
chinese-migrants-in-europe-1st-edition-amy-liu/
ebookmeta.com
Networking and Kubernetes 1st Edition James Strong &
Vallery Lancey
https://ebookmeta.com/product/networking-and-kubernetes-1st-edition-
james-strong-vallery-lancey/
ebookmeta.com
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
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
vi
Table of Contents
String Shortening������������������������������������������������������������������������������������������������������������������������ 43
Encryption����������������������������������������������������������������������������������������������������������������������������������� 45
RSA Encryption���������������������������������������������������������������������������������������������������������������������� 46
Summary������������������������������������������������������������������������������������������������������������������������������� 50
vii
Table of Contents
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
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
xiii
Table of Contents
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
About the Technical Reviewer
Phil Nash is a developer evangelist for Twilio, serving
developer communities in London and all over the world.
He is a Ruby, JavaScript, and Swift developer; Google
Developers Expert; blogger; speaker; and occasional brewer.
He can be found hanging out at meetups and conferences,
playing with new technologies and APIs, or writing open
source code.
xvii
Acknowledgments
Thank you, Phil Nash, for the valuable feedback that helped me improve the technical
content of this book with clear explanations and concise code.
Special thanks to the Apress team. This includes James Markham, Nancy Chen, Jade
Scard, and Chris Nelson. Finally, I want to thank Steve Anglin for reaching out to me to
publish with Apress.
xix
Introduction
The motivation for writing this book was the lack of resources available about data
structures and algorithms written in JavaScript. This was strange to me because
today many of the job opportunities for software development require knowledge of
JavaScript; it is the only language that can be used to write the entire stack, including the
front-end, mobile (native and hybrid) platforms, and back-end. It is crucial for JavaScript
developers to understand how data structures work and how to design algorithms to
build applications.
Therefore, this book aims to teach data structure and algorithm concepts from
computer science for JavaScript rather than for the more typical Java or C++. Because
JavaScript follows the prototypal inheritance pattern, unlike Java and C++ (which follow
the inheritance pattern), there are some changes in writing data structures in JavaScript.
The classical inheritance pattern allows inheritance by creating a blueprint-like form
that objects follow during inheritance. However, the prototypal inheritance pattern
means copying the objects and changing their properties.
This book first covers fundamental mathematics for Big-O analysis and then lays out
the basic JavaScript foundations, such as primitive objects and types. Then, this book
covers implementations and algorithms for fundamental data structures such as linked
lists, stacks, trees, heaps, and graphs. Finally, more advanced topics such as efficient
string search algorithms, caching algorithms, and dynamic programming problems are
explored in great detail.
xxi
CHAPTER 1
Big-O Notation
O(1) is holy.
—Hamid Tizhoosh
Before learning how to implement algorithms, you should understand how to analyze
the effectiveness of them. This chapter will focus on the concept of Big-O notation for
time and algorithmic space complexity analysis. By the end of this chapter, you will
understand how to analyze an implementation of an algorithm with respect to both time
(execution time) and space (memory consumed).
1
© Sammie Bae 2019
S. Bae, JavaScript Data Structures and Algorithms, https://doi.org/10.1007/978-1-4842-3988-9_1
Chapter 1 Big-O Notation
The following sections illustrate these common time complexities with some simple
examples.
Common Examples
O(1) does not change with respect to input space. Hence, O(1) is referred to as being
constant time. An example of an O(1) algorithm is accessing an item in the array by its
index. O(n) is linear time and applies to algorithms that must do n operations in the
worst-case scenario.
An example of an O(n) algorithm is printing numbers from 0 to n-1, as shown here:
1 function exampleLinear(n) {
2 for (var i = 0 ; i < n; i++ ) {
2
Chapter 1 Big-O Notation
3 console.log(i);
4 }
5 }
Similarly, O(n2) is quadratic time, and O(n3) is cubic time. Examples of these
complexities are shown here:
1 function exampleQuadratic(n) {
2 for (var i = 0 ; i < n; i++ ) {
3 console.log(i);
4 for (var j = i; j < n; j++ ) {
5 console.log(j);
6 }
7 }
8 }
1 function exampleCubic(n) {
2 for (var i = 0 ; i < n; i++ ) {
3 console.log(i);
4 for (var j = i; j < n; j++ ) {
5 console.log(j);
6 for (var k = j;
j < n; j++ ) {
7 console.log(k);
8 }
9 }
10 }
11 }
2,4,8,16,32,64
3
Chapter 1 Big-O Notation
The efficiency of logarithmic time complexities is apparent with large inputs such
as a million items. Although n is a million, exampleLogarithmic will print only 19
items because log2(1,000,000) = 19.9315686. The code that implements this logarithmic
behavior is as follows:
1 function exampleLogarithmic(n) {
2 for (var i = 2 ; i <= n; i= i*2 ) {
3 console.log(i);
4 }
5 }
4
Chapter 1 Big-O Notation
• Log of a power rule: log(nk) is O(log(n)) for any constant k > 0. With
the log of a power rule, constants within a log function are also
ignored in Big-O notation.
Special attention should be paid to the first three rules and the polynomial rule
because they are the most commonly used. I’ll discuss each of those rules in the
following sections.
This means that both 5f(n) and f(n) have the same Big-O notation of O(f(n)).
Here is an example of a code block with a time complexity of O(n):
1 function a(n){
2 var count =0;
3 for (var i=0;i<n;i++){
4 count+=1;
5 }
6 return count;
7 }
This block of code has f(n) = n. This is because it adds to count n times. Therefore,
this function is O(n) in time complexity:
1 function a(n){
2 var count =0;
3 for (var i=0;i<5*n;i++){
5
Chapter 1 Big-O Notation
4 count+=1;
5 }
6 return count;
7 }
This block has f(n) = 5n. This is because it runs from 0 to 5n. However, the first two
examples both have a Big-O notation of O(n). Simply put, this is because if n is close to
infinity or another large number, those four additional operations are meaningless. It is
going to perform it n times. Any constants are negligible in Big-O notation.
The following code block demonstrates another function with a linear time
complexity but with an additional operation on line 6:
1 function a(n){
2 var count =0;
3 for (var i=0;i<n;i++){
4 count+=1;
5 }
6 count+=3;
7 return count;
8 }
Lastly, this block of code has f(n) = n+1. There is +1 from the last operation
(count+=3). This still has a Big-O notation of O(n). This is because that 1 operation is not
dependent on the input n. As n approaches infinity, it will become negligible.
It is important to remember to apply the coefficient rule after applying this rule.
6
Chapter 1 Big-O Notation
The following code block demonstrates a function with two main loops whose time
complexities must be considered independently and then summed:
1 function a(n){
2 var count =0;
3 for (var i=0;i<n;i++){
4 count+=1;
5 }
6 for (var i=0;i<5*n;i++){
7 count+=1;
8 }
9 return count;
10 }
In this example, line 4 has f(n) = n, and line 7 has f(n) = 5n. This results in 6n.
However, when applying the coefficient rule, the final result is O(n) = n.
The following code block demonstrates a function with two nested for loops for
which the product rule is applied:
1 function (n){
2 var count =0;
3 for (var i=0;i<n;i++){
4 count+=1;
5 for (var i=0;i<5*n;i++){
6 count+=1;
7 }
8 }
9 return count;
10 }
7
Chapter 1 Big-O Notation
In this example, f(n) = 5n*n because line 7 runs 5n times for a total of n iterations.
Therefore, this results in a total of 5n2 operations. Applying the coefficient rule, the result
is that O(n)=n2.
1 function a(n){
2 var count =0;
3 for (var i=0;i<n*n;i++){
4 count+=1;
5 }
6 return count;
7 }
Summary
Big-O is important for analyzing and comparing the efficiencies of algorithms.
The analysis of Big-O starts by looking at the code and applying the rules to simplify
the Big-O notation. The following are the most often used rules:
8
Chapter 1 Big-O Notation
Exercises
Calculate the time complexities for each of the exercise code snippets.
EXERCISE 1
1 function someFunction(n) {
2
3 for (var i=0;i<n*1000;i++) {
4 for (var j=0;j<n*20;j++) {
5 console.log(i+j);
6 }
7 }
8
9 }
EXERCISE 2
1 function someFunction(n) {
2
3 for (var i=0;i<n;i++) {
4 for (var j=0;j<n;j++) {
5 for (var k=0;k<n;k++) {
6 for (var l=0;l<10;l++) {
7 console.log(i+j+k+l);
8 }
9 }
10 }
11 }
12
13 }
9
Chapter 1 Big-O Notation
EXERCISE 3
1 function someFunction(n) {
2
3 for (var i=0;i<1000;i++) {
4 console.log("hi");
5 }
6
7 }
EXERCISE 4
1 function someFunction(n) {
2
3 for (var i=0;i<n*10;i++) {
4 console.log(n);
5 }
6
7 }
EXERCISE 5
1 function someFunction(n) {
2
3 for (var i=0;i<n;i*2) {
4 console.log(n);
5 }
6
7 }
10
Chapter 1 Big-O Notation
EXERCISE 6
1 function someFunction(n) {
2
3 while (true){
4 console.log(n);
5 }
6 }
Answers
1. O(n2)
There are two nested loops. Ignore the constants in front of n.
2. O(n3)
There are four nested loops, but the last loop runs only until 10.
3. O(1)
Constant complexity. The function runs from 0 to 1000. This does
not depend on n.
4. O(n)
Linear complexity. The function runs from 0 to 10n. Constants are
ignored in Big-O.
5. O(log2n)
Logarithmic complexity. For a given n, this will operate only log2n
times because i is incremented by multiplying by 2 rather than
adding 1 as in the other examples.
6. O(∞)
11
CHAPTER 2
J avaScript Scope
The scope is what defines the access to JavaScript variables. In JavaScript, variables
can belong to the global scope or to the local scope. Global variables are variables that
belong in the global scope and are accessible from anywhere in the program.
1 test = "sss";
2 console.log(test); // prints "sss"
However, this creates a global variable, and this is one of the worst practices in
JavaScript. Avoid doing this at all costs. Always use var or let to declare variables.
Finally, when declaring variables that won’t be modified, use const.
V
Finally, the fact which all must recognise in connection with
Stevenson’s work is the versatility of talent which is displayed. From
essays personal to essays critical; from short-stories picturesque to
short-stories metaphysical, and stories of bogles to fairy stories of
princes and magic bottles and wondrous enchanted isles; from tales
of treasure to the politics of a principality, from Scottish history to
tales of the South Seas; from travel-books to poems for men and
children; from the thermal influences of forests to a defence of a
Roman Catholic hero-priest; from Samoan politics to the story of the
Justice Clerk; from plays to topographical history and imaginary war-
news and the cutting of wood-blocks (to the satisfaction of Mr.
Joseph Pennell)—that is a dazzling record. Quite obviously one
cannot contemplate it without great admiration. When it is
remembered also that it is the product of a man who was very
frequently (though not, as is generally supposed, continuously) an
invalid, the amount of it, and the variety, seems to be impossible. Yet
it is possible, and this fact it is which finally explains our attitude to
Stevenson. We think it marvellous that he should have been able to
write at all, forgetting, as we do, that “writing his best was very life to
him.” We do forget that; we ought not to forget it. We ought not to
forget that Stevenson was a writer. He meant to be a writer, and a
writer he became. He is known chiefly in these days as a writer; and
in the future he will be still more clearly seen as a writer. The
weaknesses of his work will be realised; to some extent his writing
will fall in popular esteem; but he will be less the brave soul travelling
hopefully and labouring to arrive, and more the deliberate writer.
When other men sing and walk and talk and play chess and loiter,
Stevenson wrote. In his life there is no question that he sang and
walked and loitered and talked and played chess; but when he could
do none of these things he could write. Writing was as the breath of
his body; writing was his health, his friends, his romance. He will go
down into literary history as the man who became a professional
writer, who cared greatly about the form and forms of expression.
The fact that he concentrated upon expression left his mind to some
extent undeveloped, so that he could express very excellently
perceptions more suitable to his youth than to his maturer years. It
made his earlier writing too scented and velvet-coated. But it
enabled him, when his feeling was aroused, as it only could have
been in the last years of his life, to write at great speed, with great
clearness, an account of the political troubles in Samoa and in
particular of German diplomacy there, which seems to us still
valuable—not because the facts it records are of extreme
significance, but because at the end of his life Stevenson was at last
to be found basing his work upon principles, really and consciously
grasped, from which the incidental outcome was of less importance
than the main realisation. Where he had hitherto been shuttlecocked
by his impulses, and tethered by his moralism, he became capable
of appreciating ideas as of more importance than their expression. If
he had been less prolific, less versatile, less of a virtuoso, Stevenson
might have been a greater man. He would have been less popular.
He would have been less generally admired and loved. But with all
his writing he took the road of least resistance, the road of limited
horizons; because with all his desire for romance, his desire for the
splendour of the great life of action, he was by physical delicacy
made intellectually timid and spiritually cautious. He was obliged to
take care of himself, to be home at night, to allow himself to be
looked after. Was not that the greatest misfortune that could have
befallen him? Is the work that is produced by nervous reaction from
prudence ever likely to enjoy an air of real vitality? In the versatility of
Stevenson we may observe his restlessness, the nervous fluttering
of the mind which has no physical health to nourish it. In that, at
least, and the charming and not at all objectionable inclination to
pose. He was a poseur because if he had not pretended he would
have died. It was absolutely essential to him that he should pose and
that he should write, just as it was essential that he should be
flattered and anxiously guarded from chill and harm. But it was
necessary for the same reason, lest the feeble flame should perish
and the eager flicker of nervous exuberance be extinguished. That
Stevenson was deliberately brave in being cheerful and fanciful I do
not for one moment believe; I think such a notion is the result of pure
ignorance of nervous persons and their manifestations. But that
Stevenson, beneath all his vanity, realised his own disabilities,
seems to me to be certain and pathetic. That is what makes so much
of the extravagant nonsense written and thought about Stevenson
since his death as horrible to contemplate as would be any dance of
ghouls. The authors of all this posthumous gloating over Stevenson’s
illnesses have been concerned to make him a horribly piteous figure,
to harrow us in order that we should pity. How much more is
Stevenson to be pitied for his self-constituted apostles! We shall do
ill to pity Stevenson, because pity is the obverse of envy, and is as
much a vice. Let us rather praise Stevenson for his real
determination and for that work of his which we can approve as well
as love. To love uncritically is to love ill. To discriminate with mercy is
very humbly to justify one’s privilege as a reader.
VI
It is sufficient here to maintain that Stevenson’s literary reputation, as
distinct from the humanitarian aspect of his fortitude, is seriously
impaired. It is no longer possible for a serious critic to place him
among the great writers, because in no department of letters—
excepting the boy’s book and the short story—has he written work of
first-class importance. His plays, his poems, his essays, his
romances—all are seen nowadays to be consumptive. What remains
to us, apart from a fragment, a handful of tales, and two boy’s books
(for Kidnapped, although finely romantic, was addressed to boys,
and still appeals to the boy in us) is a series of fine scenes—what I
have called “plums”—and the charm of Stevenson’s personality.
Charm as an adjunct is very well; charm as an asset is of less
significance. We find that Stevenson, reviving the never-very-
prosperous romance of England, created a school which has brought
romance to be the sweepings of an old costume-chest. I am afraid
we must admit that Stevenson has become admittedly a writer of the
second class, because his ideals have been superseded by other
ideals and shown to be the ideals of a day, a season, and not the
ideals of an age. In fact, we may even question whether his ideals
were those of a day, whether they were not merely treated by
everybody as so much pastime; whether the revival of the pernicious
notion that literature is only a pastime is not due to his influence. We
may question whether Stevenson did not make the novel a toy when
George Eliot had finished making it a treatise. If that charge could be
upheld, I am afraid we should have another deluge of critical articles
upon Stevenson, written as blindly as the old deluge, but this time
denouncing him as a positive hindrance in the way of the novel’s
progress. However that may be, Stevenson seems very decidedly to
have betrayed the romantics by inducing them to enter a cul-de-sac;
for romantic literature in England at the present time seems to show
no inner light, but only a suspicious phosphorescence. And that fact
we may quite clearly trace back to Stevenson, who galvanised
romance into life after Charles Reade had volubly betrayed it to the
over-zealous compositor.
Stevenson, that is to say, was not an innovator. We can find his
originals in Wilkie Collins, in Scott, in Mayne Reid, in Montaigne,
Hazlitt, Defoe, Sterne, and in many others. No need for him to admit
it: the fact is patent. “It is the grown people who make the nursery
stories; all the children do, is jealously to preserve the text.” That is
what Stevenson was doing; that is what Stevenson’s imitators have
been doing ever since. And if romance rests upon no better base
than this, if romance is to be conventional in a double sense, if it
spring not from a personal vision of life, but is only a tedious
virtuosity, a pretence, a conscious toy, romance as an art is dead.
The art was jaded when Reade finished his vociferous carpet-
beating; but it was not dead. And if it is dead, Stevenson killed it.
BIBLIOGRAPHY
(The dates within brackets are those of composition or of first
periodical publication.)
The Pentland Rising, 1866.
A New Form of Intermittent Light, 1871.
The Thermal Influence of Forests, 1873.
An Appeal to the Clergy of the Church of Scotland, 1875.
An Inland Voyage, 1878.
Edinburgh: Picturesque Notes, 1879.
Travels with a Donkey, 1879.
Virginibus Puerisque, 1881.
Virginibus Puerisque: four parts (1876-1879);
Crabbed Age and Youth (1878); An Apology for
Idlers (1877); Ordered South (1874); Æs Triplex
(1878); El Dorado (1878); The English Admirals
(1878); Some Portraits by Raeburn; Child’s Play
(1878); Walking Tours (1876); Pan’s Pipes (1878); A
Plea for Gas Lamps (1878).
Familiar Studies of Men and Books, 1882.
Victor Hugo’s Romances (1874); Some Aspects of
Robert Burns (1879); Walt Whitman (1878); Henry
David Thoreau (1880); Yoshida Torajiro (1880);
François Villon (1877); Charles of Orleans (1876);
Samuel Pepys (1881); John Knox, and his Relations
to Women (1875).
New Arabian Nights, 1882.
The Suicide Club and the Rajah’s Diamond (1878);
The Pavilion on the Links (1880); A Lodging for the
Night (1877); The Sire de Malétroit’s Door (1878);
Providence and the Guitar (1878).
The Silverado Squatters, 1883.
Treasure Island, 1883.
Prince Otto, 1885.
A Child’s Garden of Verses, 1885.
The Dynamiter, 1885.
Dr. Jekyll and Mr. Hyde, 1886.
Kidnapped, 1886.
The Merry Men, 1887.
The Merry Men (1882); Will o’ the Mill (1878);
Markheim (1885); Thrawn Janet (1881); Olalla
(1885); The Treasure of Franchard (1883).
Memories and Portraits, 1887.
The Foreigner at Home (1882); Some College
Memories (1886); Old Mortality (1884); A College
Magazine; An Old Scotch Gardener (1871); Pastoral
(1887); The Manse (1887); Memoirs of an Islet;
Thomas Stevenson (1887); Talk and Talkers (1882);
The Character of Dogs (1883); “A Penny Plain and
Twopence Coloured” (1884); A Gossip on A Novel of
Dumas’s; A Gossip on Romance (1882); A Humble
Remonstrance (1884).
Underwoods, 1887.
Memoir of Fleeming Jenkin (in “Papers Literary, Scientific,
etc.,” by Fleeming Jenkin), 1887.
The Black Arrow, 1888.
The Master of Ballantrae, 1889.
The Wrong Box, 1889.
Father Damien, 1890.
Ballads, 1890.
Across the Plains, 1892.
Across the Plains (1883); The Old Pacific Capital
(1880); Fontainebleau (1884); Epilogue to “An Inland
Voyage” (1888); The Coast of Fife (1888); The
Education of an Engineer (1888); The Lantern-
Bearers (1888); A Chapter on Dreams (1888);
Beggars (1888); Letter to a Young Gentleman
(1888); Pulvis et Umbra (1888); A Christmas
Sermon (1888).
The Wrecker, 1892.
A Footnote to History, 1892.
Three Plays, 1892.
Deacon Brodie (1880); Beau Austin (1884); Admiral
Guinea (1884).
Island Nights Entertainments, 1893.
The Beach of Falesá (1892); The Bottle Imp (1891);
The Isle of Voices (1893).
Catriona, 1893.
The Ebb Tide, 1894.
Vailima Letters, 1895.
[Dr. Jekyll and Mr. Hyde and] Fables, 1896.
Weir of Hermiston, 1896.
Songs of Travel, 1896.
A Mountain Town in France, 1896.
Four Plays, 1896.
Deacon Brodie; Beau Austin; Admiral Guinea;
Macaire (1885).
St. Ives, 1898.
Letters to His Family and Friends, 1899.
In the South Seas, 1900.
The Pocket R. L. S. (containing “Prayers”), 1902.
Essays in the Art of Writing, 1905.
On Some Technical Elements of Style in Literature
(1885); The Morality of the Profession of Letters
(1881); Books which have Influenced Me (1887); A
Note on Realism (1883); My First Book: Treasure
Island (1894); The Genesis of “The Master of
Ballantrae” (1890); Preface to “The Master of
Ballantrae” (1889).
Tales and Fantasies, 1905.
The Misadventures of John Nicholson (1887); The
Body-Snatcher (1884); The Story of a Lie (1879).
Essays of Travel, 1905.
The Amateur Emigrant (1879); Cockermouth and
Keswick (1871); An Autumn Effect (1875); A
Winter’s Walk (1876); Forest Notes (1875-6); A
Mountain Town in France (1879); Rosa quo Locorum
(1890); The Ideal House; Davos in Winter (1881);
Health and Mountains (1881); Alpine Diversions
(1881); The Stimulation of the Alps (1881); Roads
(1873); On the Enjoyment of Unpleasant Places
(1874).
Poems, 1906.
Underwoods; Ballads; Songs of Travel.
Lay Morals and Other Papers, 1911.
Lay Morals (1879); Father Damien (1890); The
Pentland Rising (1866); The Day after To-morrow
(1887); [College Papers] Edinburgh Students in
1824 (1871); The Modern Student considered
generally (1871); Debating Societies (1871); The
Philosophy of Umbrellas (1871); The Philosophy of
Nomenclature (1871); [Criticisms] Lord Lytton’s
“Fables in Song” (1874); Salvini’s Macbeth (1876);
Bagster’s “Pilgrim’s Progress” (1882); [Sketches]
The Satirist (? 1870); Nuits Blanches (? 1870); The
Wreath of Immortelles (? 1870); Nurses (1870); A
Character (? 1870); The Great North Road (1895);
The Young Chevalier (1892); Heathercat (1894).
Records of a Family of Engineers, 1912.
Poems, 1918.
Underwoods; Ballads; Songs of Travel; A Child’s
Garden.
The Edinburgh Edition of the Works. 27 vols. 1894-97.
The Pentland Edition ” 20 vols. 1906-07.
The Swanston Edition ” 25 vols. 1911-12.
WILLIAM BRENDON AND SON, LTD.
PRINTERS, PLYMOUTH
MARTIN SECKER’S
COMPLETE CATALOGUE OF
BOOKS PUBLISHED BY HIM AT
NUMBER FIVE JOHN STREET
ADELPHI LONDON
AUTUMN
MCMXIV
The Books in this list should be obtainable from all
Booksellers and Libraries, and if any difficulty is
experienced the Publisher will be glad to be informed of
the fact. He will also be glad if those interested in
receiving from time to time Announcement Lists,
Prospectuses, etc., of new and forthcoming books from
Number Five John Street, will send their names and
addresses to him for this purpose. Any book in this list
may be obtained on approval through the booksellers, or
direct from the Publisher, on remitting him the published
price, plus the postage.
Telephone City 4779
Telegraphic Address:
Psophidian London
PART I
INDEX OF AUTHORS
ABERCROMBIE, LASCELLES
Speculative Dialogues. Wide Crown 8vo. 5s. net.
Thomas Hardy: A Critical Study. Demy 8vo. 7s.
6d. net.
The Epic (The Art and Craft of Letters). F’cap 8vo.
1s. net.
AFLALO, F. G.
Behind the Ranges. Wide Demy 8vo. 10s. 6d. net.
Regilding the Crescent. Demy 8vo. 10s. 6d. net.
Birds in the Calendar. Crown 8vo. 3s. 6d. net.
ALLSHORN, LIONEL
Stupor Mundi. Medium Octavo. 16s. net.
APPERSON, G. L.
The Social History of Smoking. Post 8vo. 6s.
net.
ARMSTRONG, DONALD
The Marriage of Quixote. Crown 8vo. 6s.
BARRINGTON, MICHAEL
Grahame of Claverhouse. Imperial 8vo. 30s. net.
Edition de Luxe 63s. net.
BENNETT, ARNOLD
Those United States. Post 8vo. 5s. net.
BLACK, CLEMENTINA
The Linleys of Bath. Medium 8vo. 16s. net.
The Cumberland Letters. Medium 8vo. 16s. net.
BOULGER, D. C.
The Battle of the Boyne. Med. 8vo. 21s. net.
The Irish Exiles at St. Germains. Med. 8vo. 21s.
net.
BOTTOME, PHYLLIS
The Common Chord. Crown 8vo. 6s.
BURROW, C. KENNETT
Carmina Varia. F’cap 8vo. 2s. 6d. net.
CALDERON, GEORGE (With St. John Hankin)
Thompson: A Comedy. Sq. Cr. 8vo. 2s. net.
CANNAN, GILBERT
Round the Corner. Crown 8vo. 6s.
Old Mole. Crown 8vo. 6s.
Samuel Butler: A Critical Study. Demy 8vo. 7s.
6d. net.
Satire (The Art and Craft of Letters). F’cap 8vo. 1s.
net.
CHESTERTON, G. K.
Magic: A Fantastic Comedy. Sq. Cr. 8vo. 2s. net.
CLAYTON, JOSEPH
The Underman. Crown 8vo. 6s.
Leaders of the People. Demy 8vo. 12s, 6d. net.
Robert Kett and the Norfolk Rising. Demy 8vo.
8s. 6d. net.
COKE, DESMOND
The Art of Silhouette. Demy 8vo. 10s. 6d. net.
CRAVEN, A. SCOTT
The Fool’s Tragedy. F’cap 8vo. 6s.
DE SÉLINCOURT, BASIL
Walt Whitman: A Critical Study. Demy 8vo. 7s.
6d. net.
DRINKWATER, JOHN
William Morris: A Critical Study. Demy 8vo. 7s.
6d. net.
D. G. Rossetti: A Critical Study. Demy 8vo. 7s.
6d. net.
The Lyric (The Art and Craft of Letters). F’cap 8vo.
1s. net.
DOUGLAS, NORMAN
Fountains in the Sand. Wide Demy 8vo. 7s. 6d.
net.
Old Calabria. Demy 8vo. 10s. 6d. net.
DOUGLAS, THEO
White Webs. Crown 8vo. 6s.
FEA, ALLAN
Old English Houses. Demy 8vo. 10s. 6d. net.
Nooks and Corners of Old England. Small
Crown 8vo. 5s. net.
The Real Captain Cleveland. Demy 8vo. 8s. 6d.
net.
FRANCIS, RENÉ
Egyptian Æsthetics. Wide Demy 8vo. 7s. 6d. net.
FREEMAN, A. M.
Thomas Love Peacock: A Critical Study. Demy
8vo. 7s. 6d. net.
GRETTON, R. H.
History (The Art and Craft of Letters). F’cap 8vo.
1s. net.
HANKIN, ST. JOHN
The Dramatic Works, with an Introduction by John
Drinkwater. Small 4to. Definitive Limited Edition in
Three Volumes. 25s. net.
The Return of the Prodigal. Sq. Cr. 8vo. 2s. net.
The Cassilis Engagement. Sq. Cr. 8vo. 2s. net.
The Charity that Began at Home. Sq. Cr. 8vo. 2s.
net.
The Constant Lover, etc. Sq. Cr. 8vo. 2s. net.
HAUPTMANN, GERHART
The Complete Dramatic Works. 6 vols. Crown
8vo. 5s. net per volume.
HEWLETT, WILLIAM
Telling the Truth. Crown 8vo. 6s.
Uncle’s Advice: A Novel in Letters. Cr. 8vo. 6s.
HORSNELL, HORACE
The Bankrupt. Crown 8vo. 6s.
HOWE, P.P.
The Repertory Theatre. Cr. 8vo. 2s. 6d. net.
Dramatic Portraits. Crown 8vo. 5s. net.
Bernard Shaw: A Critical Study. Demy 8vo. 7s.
6d. net.
J. M. Synge: A Critical Study. Demy 8vo. 7s. 6d.
net.
Criticism (The Art and Craft of Letters). F’cap 8vo.
1s. net.
HUEFFER, FORD MADOX
Henry James: A Critical Study. Demy 8vo. 7s. 6d.
net.
IBSEN, HENRIK
Peer Gynt. A New Translation by R. Ellis Roberts.
Wide Crown 8vo. 5s. net.
JACOB, HAROLD
Perfumes of Araby. Wide Demy 8vo. 7s. 6d. net.
LAMONT, L. M.
A Coronal: An Anthology. F’cap 8vo. 2s. 6d. net.
Thomas Armstrong, C.B.: A Memoir. Demy 8vo.
10s. 6d. net.
LLUELLYN, RICHARD
The Imperfect Branch. Crown 8vo. 6s.
LOW, IVY
The Questing Beast. Crown 8vo. 6s.
MACHEN, ARTHUR
Hieroglyphics: A Note upon Ecstasy in
Literature. F’cap 8vo. 2s. 6d. net.
MACKENZIE, COMPTON
Carnival. Crown 8vo. 6s. and 1s. net.
Sinister Street. I. Crown 8vo. 6s.
Sinister Street. II. Crown 8vo. 6s.
The Passionate Elopement. Crown 8vo. 6s. and
2s. net.
Poems. Crown 8vo. 5s. net.
Kensington Rhymes. Crown 4to. 5s. net.
MAKOWER, S. V.
The Outward Appearance. Crown 8vo. 6s.
MAVROGORDATO, JOHN
Letters from Greece. F’cap 8vo. 2s. net.
MELVILLE, LEWIS
Some Eccentrics and a Woman. Demy 8vo. 10s.
6d. net.
METHLEY, VIOLET
Camille Desmoulins: A Biography. Demy 8vo. 15s.
net.
MEYNELL, VIOLA
Lot Barrow. Crown 8vo. 6s.
Modern Lovers. Crown 8vo. 6s.
NIVEN, FREDERICK
A Wilderness of Monkeys. Crown 8vo. 6s.
Above Your Heads. Crown 8vo. 6s.
Dead Men’s Bells. Crown 8vo. 6s.
The Porcelain Lady. Crown 8vo. 6s.
Hands Up! Crown 8vo. 6s.
NORTH, LAURENCE
Impatient Griselda. Crown 8vo. 6s.
The Golightlys: Father and Son. Cr. 8vo. 6s.
ONIONS, OLIVER