Programming Interviews Exposed Giguere pdf download
Programming Interviews Exposed Giguere pdf download
https://textbookfull.com/product/programming-interviews-exposed-
giguere/
https://textbookfull.com/product/programming-interviews-for-
dummies-1st-edition-eric-t-jones/
https://textbookfull.com/product/programming-interviews-for-
dummies-1st-edition-john-sonmez-eric-butow/
https://textbookfull.com/product/elements-of-programming-
interviews-the-insiders-guide-2nd-edition-adnan-aziz/
https://textbookfull.com/product/open-data-exposed-bastiaan-van-
loenen/
Kelly Exposed (Innocence Corrupted) 1st Edition Viktor
Redreich
https://textbookfull.com/product/kelly-exposed-innocence-
corrupted-1st-edition-viktor-redreich/
https://textbookfull.com/product/characteristically-american-
memorial-architecture-national-identity-and-the-egyptian-
revival-1st-edition-joy-m-giguere/
https://textbookfull.com/product/our-humanity-exposed-predictive-
modelling-in-a-legal-context-stanley-greenstein/
https://textbookfull.com/product/badiou-and-his-interlocutors-
lectures-interviews-and-responses-alain-badiou/
https://textbookfull.com/product/black-light-exposed-black-light-
series-book-2-1st-edition-jennifer-bene/
PROGRAMMING INTERVIEWS EXPOSED
PREFACE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Programming Interviews Exposed
Fourth Edition
Programming Interviews Exposed
CODING YOUR WAY THROUGH THE INTERVIEW
Fourth Edition
John Mongan
Noah Kindler
Eric Giguère
Programming Interviews Exposed: Coding Your Way Through the Interview, Fourth Edition
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2018 by John Wiley & Sons, Inc., Indianapolis, Indiana
ISBN: 978-1-119-41847-4
ISBN: 978-1-119-41849-8 (ebk)
ISBN: 978-1-119-41848-1 (ebk)
10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the
Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201)
748-6008, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with
respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including
without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or pro-
motional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold
with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services.
If professional assistance is required, the services of a competent professional person should be sought. Neither the pub-
lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to
in this work as a citation and/or a potential source of further information does not mean that the author or the publisher
endorses the information the organization or Web site may provide or recommendations it may make. Further, readers
should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was
written and when it is read.
For general information on our other products and services please contact our Customer Care Department within the
United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with
standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media
such as a CD or DVD that is not included in the version you purchased, you may download this material at http://
booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2018935416
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trade-
marks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries,
and may not be used without written permission. All other trademarks are the property of their respective owners. John
Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.
To Thuy, the love of my life, who understands me, and
Calvin, who lights up my days.
—John Mongan
—Noah Kindler
—Eric Giguère
ABOUT THE AUTHORS
NOAH KINDLER is VP Technology at the security technology company Avira. He leads software
design and development teams across several products with a user base of over 100 million.
ERIC GIGUÈRE started programming in BASIC on a Commodore VIC-20 (a long time ago) and was
hooked. He holds BMath and MMath degrees in computer science from the University of Waterloo,
has extensive professional programming experience, and is the author of several programming
books. He currently works as a staff software engineer at Google.
ABOUT THE TECHNICAL EDITORS
WAYNE HEYM, PhD, is a Senior Lecturer in the Department of Computer Science and Engineering
for The Ohio State University’s College of Engineering. He also collaborates with their Reusable
Software Research Group (RSRG). He maintains a strong interest in RSRG’s development discipline
and language, Reusable Software Language with Verifiability and Efficiency (RESOLVE). He enjoys
introducing beginning programmers to the wonders in the art and science of computer program-
ming. He also likes leading programmers into the rich and satisfying realm of the theoretical foun-
dations of computer science.
DAN HILL is a software engineer and software development manager with over 15 years of experi-
ence, working on projects that include web development, user interface design, back-end system
architecture, databases, security and cryptography, and mobile app development. He has worked
for Silicon Valley startups as well as larger technology companies, and has conducted countless pro-
gramming interviews. He holds BS and MS degrees in computer science from Stanford University.
CREDITS
WE DEEPLY APPRECIATE the efforts of our colleagues at Wiley and Serendipity23 Editorial Services
in bringing this revised fourth edition to fruition. The contributions of our project editor, Adaobi
Obi Tulton, whose deft edits, organization, and persistence kept us on track, and the personal atten-
tion of our executive editor, Jim Minatel, were especially key, and we thank them for their time,
work, and assistance.
The quality of this edition has been greatly improved by the work of our technical editors, Wayne
Heym and Dan Hill, both of whom have already made important contributions to prior editions.
Their thoughtful comments and meticulous review have eliminated numerous errors and oversights
and immeasurably improved the clarity of the book. We thank them for their extensive work.
We are also grateful to Andrew Taylor for additional review of the new data science material, and
Tom Mongan for assistance with proofreading.
No fourth edition would have been possible without the three that preceded it, and the many people
who contributed to them. John is particularly grateful for Michael J. Mongan’s help in facilitat-
ing his participation with the third edition. We thank our third edition editor Maureen Spears,
who swiftly and surely overcame the unique challenges that arose in preparation of that edition.
Additionally, we thank our original editors, Margaret Hendrey and Marjorie Spencer, for their
patience and helpfulness. We are also grateful to our original reviewers and advisors, Dan Hill, Elise
Lipkowitz, Charity Lu, Rob Maguire, and Tom Mongan. Dan’s contributions in particular were tre-
mendous—the quality of the first edition was vastly improved by his careful and detailed reviews.
CONTENTS
PREFACE xxv
INTRODUCTION xxix
Know Yourself 1
Know the Market 3
Basic Market Information 3
What About Outsourcing? 4
Develop Marketable Skills 5
Get Things Done 6
Manage Your Online Profile 7
Summary 8
Chapter 2: THE JOB APPLICATION PROCESS 9
The Process 29
The Scenario 29
The Problems 30
Which Languages to Use 30
Interactivity Is Key 31
Solving the Problems 32
The Basic Steps 32
When You Get Stuck 34
Analyzing Your Solution 34
Big-O Analysis 35
How Big-O Analysis Works 36
Best, Average, and Worst Cases 37
Optimizations and Big-O Analysis 37
How to Do Big-O Analysis 38
Which Algorithm Is Better? 38
Memory Footprint Analysis 39
Summary 40
xviii
CONTENTS
Trees 75
Binary Trees 77
Binary Search Trees 78
Heaps 80
Common Searches 80
Breadth-First Search 80
Depth-First Search 81
Traversals 81
Graphs 82
Tree and Graph Problems 83
Height of a Tree 83
Preorder Traversal 84
Preorder Traversal, No Recursion 85
Lowest Common Ancestor 87
Binary Tree to Heap 88
Unbalanced Binary Search Tree 91
Six Degrees of Kevin Bacon 93
Summary 97
Arrays 99
C and C++ 100
Java 101
C# 102
JavaScript 102
Strings 102
C 103
C++ 104
Java 104
xix
CONTENTS
C# 105
JavaScript 105
Array and String Problems 105
Find the First Nonrepeated Character 106
Remove Specified Characters 109
Reverse Words 112
Integer/String Conversions 116
From String to Integer 116
From Integer to String 118
UTF-8 String Validation 121
Summary 124
xx
CONTENTS
Fundamentals 181
Classes and Objects 181
Construction and Destruction 182
Inheritance and Polymorphism 183
Object-Oriented Programming Problems 184
Interfaces and Abstract Classes 184
Virtual Methods 186
Multiple Inheritance 188
Resource Management 189
Summary 191
xxi
CONTENTS
SQL 204
NoSQL 208
Object Databases 209
Hybrid Key-Value/Column Databases 209
Database Transactions 210
Distributed Databases 211
Database Problems 212
Simple SQL 212
Company and Employee Database 212
Max, No Aggregates 215
Three-Valued Logic 216
School Schemata 218
Summary 222
Graphics 223
Bit Manipulation 224
Binary Two’s Complement Notation 224
Bitwise Operators 225
Optimizing with Shifts 226
Graphics Problems 226
Eighth of a Circle 227
Rectangle Overlap 229
Bit Manipulation Problems 232
Big-Endian or Little-Endian 233
Number of Ones 235
Summary 237
Preparation 289
Problems 290
C++ versus Java 291
Friend Classes 292
Argument Passing 292
Macros and Inline Functions 294
Inheritance 295
Garbage Collection 296
32-Bit versus 64-Bit Applications 297
Network Performance 298
Web Application Security 298
Cryptography 301
Hash Tables versus Binary Search Trees 301
MapReduce 302
Summary 302
xxiii
CONTENTS
INDEX 333
xxiv
PREFACE
Solving problems that are presented in programming interviews requires a separate skillset from
what you need to be a good programmer. Just like anything else, you probably won’t be very good
at this when you first start, but you can develop and improve your skills just as we did. This book is
the first step in that process; through this book we leverage your programming expertise to rapidly
turn you into an expert at programming interviews.
Since the first edition, Programming Interviews Exposed has effectively established a new topic area
of programming books, and now a multitude of websites, blogs, and forums provide advice and
sample questions. With all that available, why should you invest your time and money in this book?
Our focus continues to be on teaching you the techniques and approaches you need to be success-
ful in programming interviews. We reinforce these by illustrating the thought process that leads to
the solution of each of the problems we present, and show you how to move forward when you’re
stuck. These skills overlap with general coding skills, but they’re not the same; we’ve seen great cod-
ers crash and burn in programming interviews because they haven’t developed their interview skills.
Early in our careers we crashed and burned a couple times ourselves, but you can avoid that by
beginning your preparation with this book. Once you’ve learned the skills taught in this book you’ll
continue to learn by applying them to the problems you find in other books and on the web, but this
is the book you want to start with.
One thing that never changes is that to become good at solving programming interview questions,
you have to do more than passively read about them: you need to practice them. You’ll get a lot
more out of this book if you work out as much of each solution as you can on your own before you
read about it.
Although the content of the book has expanded significantly since the first edition and the languages
employed have shifted, we’ve stayed true to the goals and approach we set out then, described in the
original preface, which follows.
questions about computers. This book discusses each of the kinds of problems you are likely to
encounter and illustrates how they are best approached using questions from real interviews as
examples.
At this point you may be wondering who we are and what gives us the authority to write this book.
We’re both recent graduates who’ve been through a lot of interviews in the past few years. We’ve
interviewed for jobs ranging from technical consulting with large established companies to writing
device drivers for startups. This book is based on the experiences and observations we’ve taken from
those interviews—what yielded offers and what didn’t. We believe that this is the best possible basis
for a book like this. Rather than give you some HR exec’s idea of how interviewing should be done
or a head hunter’s impression of how it might be done, we will tell you what interviews are really
like at America’s top software and computer companies and what you need to do to get the job
you want.
NOTE For the record, we don’t think that the way interviewing is done today
is necessarily the way it should be done. The current paradigm puts too much
emphasis on the ability to solve puzzles and familiarity with a relatively limited
body of knowledge, and it generally fails to measure a lot of the skills that are
critical to success in industry.
To that end, we haven’t made up any of the questions in this book. Every last one of them has been
lifted from a recent interview. The distributions of problem type and difficulty are similar to what
you should expect to encounter in your interviews. We must emphasize that the problems presented
in this book are a representative sample of the questions asked in interviews, not a comprehensive
compilation. Reading this book straight through and memorizing the answers would completely
miss the point. You may be asked some of the questions that appear in this book, but you should
not expect that. A large and constantly changing body of questions is asked, and any intelligent
interviewer who has seen this book will never again use any of the questions that appear here. On
the other hand, interview questions encompass relatively few topic areas and types of questions,
and these rarely change. If you work on learning to solve not just the specific problems we pres-
ent, but the types of problems we present, you’ll be able to handle anything they throw at you in an
interview.
We’ve taken a couple of steps to facilitate the objective of improving your problem-solving skills.
First, where appropriate, we provide reviews of important topics before we present questions on
those topics. Second, instead of merely giving answers to the problems, we illustrate the problem-
solving process from beginning to solution. We’ve found that most textbooks and nearly all puzzle
books take a different approach to examples: they begin with a problem, go immediately to the
answer, and then explain why the answer is correct. In our experience, the result is that the reader
may understand the particular answer and why it’s right, but is left with no clue as to how the
author came up with that solution or how a similar problem might be solved. We hope that our step-
by-step approach to solutions will address this issue, helping you to understand not only the answers
but also how you arrive at the answers.
xxvi
PREFACE
Learning by watching is never as effective as learning by doing. If you want to get the most out of
this book, you will have to work out the problems yourself. We suggest the following method:
1. After you read a problem, put the book down and try to work out the solution.
2. If you get stuck, start reading the solution. We never blurt out the answer at the beginning,
so you don’t have to worry that we’re going to give away the entire solution.
3. Read just far enough to get the hint you need, and then put down the book and keep
working.
4. Repeat this as necessary.
The more of the solution you work out yourself, the better your understanding will be. In addition,
this method closely resembles the actual interview experience, where you will have to solve the prob-
lems yourself, but the interviewer will give you hints when you get stuck.
Programming is a difficult and technical art. It would be impossible to teach everything you need to
know about computers and programming in one book. Therefore, we’ve had to make some assump-
tions about who you are. We assume that you have a background in computers equivalent to at least
the first year or two of a computer science degree. Specifically, we expect that you are comfortable
with programming in C, that you’ve had some experience with object-oriented programming in C++
or perhaps Java, and that you know the fundamentals of computer architecture and computer sci-
ence theory. These are effectively the minimum requirements for a general development job, so most
interviewers will have similar expectations. If you find yourself lacking in any of these areas, you
should seriously consider seeking more education before starting your job search and interviews.
It’s also possible that you have a great deal more computer knowledge and experience than what
we’ve described as the minimum requirements. If so, you may be particularly interested in some of
the more advanced topics included. However, don’t ignore the basic topics and questions, no mat-
ter how much experience you have. Interviewers tend to start with the fundamentals regardless of
what’s on your résumé.
We have made every effort to ensure that all of the information in this book is correct. All of the
code has been compiled and tested. Nevertheless, as you probably know all too well from your own
programs, a few bugs and errors are inevitable. As we become aware of such problems, we will post
corrections.
We’re confident that you’ll find this book useful in getting the job you want. We hope that you may
also find it an entertaining exploration of some clever puzzles in your chosen profession. If you’d like
to tell us about your reaction to our book, share your thoughts on any particular problem or topic,
or provide a problem from one of your recent interviews, we’d love to hear from you.
Go find a killer job!
xxvii
Other documents randomly have
different content
they swept over the causewayed streets, driven at a hard trot
towards the bridge of Merida.
"Caramba! Rouse, senors," cried Alvaro, who was the first to
awake.
"Carajo! Ay, there go the field-pieces: old Rowland's in his
saddle already," muttered the major, scrambling up from the floor on
which he had rolled in the night time, and placing his large bonnet
on the wrong way, permitting the long feathers to stream down his
back. "Rouse, gentlemen! Up and be doing, sirs, or we shall be
missed from our posts. Old Mahoud take the rule for marching
before day-break! Sir Ralph never made us do so in Egypt, and we
gained laurels there, gentlemen—I say we did. This infernal bonnet!
'tis always falling off."
"I wish to Heaven I could sleep an hour longer!" said Ronald. "I
have scarcely had three hours' sleep this week past."
"Our brigade never sleep, gentlemen," cried Campbell, who was
still a little inebriated, "never! We march all night, and fight all day:
we used to reverse the matter in Egypt. But what have we here?
Peter Forbes—or what is your name, what's the matter? Are
Dombrouski's dragoons among ye?"
"Ave Maria! O Dios mio! O Senor Don Alvaro!" cried Sargento
Pedro Gomez, appearing at the entrance of the room with a lamp in
his hand; "we have had the devil among us last night!"
"How so, fellow? What has happened?"
"The bravo has escaped—"
"How! Diavolo, escaped?"
"Ay, noble senor, and carried off the carbine of poor Diego de la
Zarza, whom we found lying within the chamber with his throat cut
from ear to ear."
The cavalier ground his teeth with absolute fury, while his olive
cheek grew black with rising passion.
"Santos! Santissimus!" cried he; "would to San Juan, and all the
calendar, I had hanged him last night! My brave Diego—but he must
have slept; if so, he deserves his fate. Well, there is no help for this
matter; we will give Narvaez Cifuentes a short prayer and a long
stab the next time we meet, and that without delay. But we must be
off; the cavalry advance-guard, and part of the artillery, have already
passed. Let the trompetero sound 'to horse;' and hasten, Pedro, and
get the troop into their saddles. Though we belong to the division of
Murillo, we will cross the bridge with you to-day, senors, and strike a
blow for honour. Viva Eapaña y buena Esperanza! 'Tis a better war-
shout than the Vive l'Empereur of the followers of the perfidious
Buonaparte."
"There are the drums of our brigade," said Ronald Stuart; "and
should we be missed by Fassifern, the excellency of Don Alvaro's
purple Malaga and sherry, or even the smiles of Donna Catalina
herself, would form but a poor excuse for lingering. Hark! the
generale."
"You improve in the art of gallantry," observed Macdonald; "you
could not have turned such fine speeches the morning we halted in
the Black Horse-square, at Lisbon. But I regret that we must march
without bidding adieu to our fair patrona."
"Forward, cavaliers; Catalina will excuse our departing without
bidding her farewell. Down the stair-case to the left, senors," cried
Alvaro. "Pedro Gomez, knave,—light the way!" and they pressed
forward into the street, feeling the chill air of the morning blow
strangely on their faces, while their heads swam with the fumes of
the wine taken so lately.
"It will be long ere I forget the night we spent in Merida," said
Macdonald.
"And long ere I do so, truly," replied Stuart, casting his eyes
vacantly over the dark windows of the mansion of Villa Franca.
"Ah!—Donna Catalina; are you looking for her?"
"Such strange scenes of fray and other matters! Had such a row
occurred at home, all Britain would have rung with it, from Dover to
Cape Wrath; but here it is as nothing."
"Hark! what is that, Stuart?"
"A cry,—by Heaven, a most appalling one!" A loud shriek arose
from amid the darkness in which the Plaza was involved. They
hastened to that part of the square from whence it appeared to
issue, and found that the conflict in which they had borne so
conspicuous a part was not the only outrage committed that night in
Merida. They discovered a young Portuguese lad, the private servant
of Lieutenant-colonel Macdonald of the Gordon Highlanders, lying
dead under the piazzas, stabbed to the heart with a long stiletto or
knife, and the assassin was never discovered.
For some hours the dark streets of the city rang to the
measured tramp of marching soldiers, the clatter of accoutrements,
the clang of hoofs, and the rumble of heavy wheels, as artillery,
cavalry, and infantry moved rapidly forward; but by sunrise the
whole division had crossed the bridge, and on the opposite side of
the river pursued their route towards Almendralejo.
"Colonel Cameron!" cried old W——, the brigade-major,
cantering up to the head of the column; "Major-general Howard
requests that you will increase your front. It is Sir Rowland's order."
"Form sub-divisions!" cried Fassifern, in the loud and manly tone
of authority which so well became him. "Rear sections, left oblique—
double quick!" The order was obeyed along the whole column by
each regiment in succession. Their fine brass bands filled the air with
martial music, causing every heart to vibrate to the sharp sound of
the soul-stirring trumpet, the cymbals, and trombone. The horses
shook their manes,—their riders sat more erect; the waving colours
were flung forward on the breeze above the steel ridges of glittering
bayonets, and the brave hearts of those who marched beneath them
grew light and animated at the prospect of a brush with the enemy.
Their starving condition, their faded uniform, the discomfort of the
last night's bivouac, were forgotten,—all was military, gay and
exciting to the utmost, filling every bosom with the pride of the
profession and the fervent "glow of chivalry." Sir Rowland Hill, with
his staff, viewed from a little eminence the whole length of the
column of that division of the army under his command, as they
passed, and a pleasing smile animated the benevolent features of
the bluff old general, when he beheld the willingness with which the
foot-sore and almost shoe-less soldiers pressed forward, although
they had endured all that could render troops, less persevering and
disciplined, less hardy and less brave, mutinous.
Toilsome forced marches—shelterless bivouacs, starvation,
receiving no provisions sometimes for three consecutive days,—no
clothing, and almost ever in arrears of pay—on one occasion for six
months,—nothing but the hope of a change, and the redoubtable
spirit which animated them, could have supported the British soldiers
under the accumulation of miseries suffered by them in the
Peninsula,—miseries which were lessened to the French troops, by
their living at free quarters wherever they went.
These things, however, were forgotten for the present time, and
with others Ronald Stuart felt all the ardour which the display before
him and the fineness of the morning were calculated to inspire. The
bright sun shone from an unclouded sky, filling the clear blue vault
with warmth; the birds were chirping and hopping merrily among
the dewy branches of the olive thickets and dark laurel bushes
overhanging the broad path, the deep dingles on each side of which
echoed to the notes of the sounding music.
Ronald looked back to the flat-roofed mansions and Roman
ruins of Merida, on the grey walls of which, casting bold shadows,
streamed the full splendour of the morning sun. The cavalry
rearguard were slowly crossing the ancient bridge, and with the red
coats came the brown uniform of Spain: it was the troop of Don
Alvaro advancing, with their polished helmets and tall lances flashing
in the sun, and finding a sparkling reflection in the deep blue current
of the Guadiana below.
Ronald carried for the first time the regimental colour, which
bore evident marks of service, being pierced in many places by
musket-shot. It was a laborious affair to sustain, especially during a
breeze, being large, and of rich yellow silk, fringed round with
bullion. The sphinx,—the badge of Egypt, (the pride of the major's
heart,) surrounded by a wreath of the brave old thistle, and the
honourable mottoes 'Egmont-op-Zee,' 'Mandora,' and 'Bergen-op-
Zoom,'[*] all sewn, as usual, by fair hands, and done in massive
gold embroidery, appeared in the centre of the standard, which the
Duchess of Gordon had presented to the clan-regiment of her son.
[*] Such, with many additions, are still the badges of the Gordon Highlanders. For
the information of unmilitary readers I may state, that every corps has two
colours,—a king's and regimental; the first carried by the senior, and the latter by
the junior ensign.
"Stuart, I see you are casting longing looks back to Merida," said
Alister in his usual jesting manner, as he marched by Ronald's side
with the gaudy king's colour sloped on his shoulder. "There is some
attraction in our rear, I perceive; you are ever looking that way."
"Ay, yonder comes Don Alvaro and his troop of lances; how
gallant they appear! But they are almost hidden in the dust raised by
the rear of the column."
"Look above the colours of the 71st, and you will see the roof
which contains the fair Catalina; it was for that you were searching
so narrowly. I can read your thoughts, you see, without being a
conjuror. Stuart, my boy, you are very green in these matters,
otherwise you would not blush as scarlet as your coat, which, by the
by, is rapidly becoming purple."
"What stuff you talk, Macdonald! What is Catalina to me?"
"Pshaw! now you need not bristle up so fiercely. Were you not
making downright love to her last night? And the don himself would
have seen it, but had drunk too much Malaga."
"Impossible, Alister! You must dream, or this is some of your
usual nonsense. I have no recollection of speaking to Donna Catalina
otherwise than I would have done to any lady,—and Campbell heard
me."
"The major had over much sherry under his belt, and made too
much noise about Egypt,—the pyramids,—Pompey's pillar,—the
battle of Alexandria, and Heaven knows all what, to hear any one
speaking but himself. We spent the night in glorious style, however;
but the taste of that horrible garlic——Heavens above! what is this?"
Alister's sudden exclamation was not given without sufficient
reason.
A carbine flashed from among the dark evergreens which
overhung the road, and Ronald Stuart, staggering backwards, fell
prostrate and bleeding at the feet of his comrades, from whom burst
a wild shout of rage and surprise; but the strictness of British
discipline prevented any man from moving in search of the assassin.
"Hell's fury!" cried Colonel Cameron, spurring his horse to the
spot, while his eyes shot fire. "Search the bushes; forward, men! Do
not fire, in case of alarming the rear of the column; but fix bayonets,
—slay, hew, and cut to pieces whoever you find."
With mingled curses and shouts a hundred Highlanders dashed
through the thicket; but their heavy knapsacks and the tall plumes
of their bonnets impeded their movements in piercing the twisted
and tangled branches of the thickly-leaved laurels. They searched
the grove through and through, beating the bushes in every
direction; but no trace of the assassin was found, save a broad-
brimmed sombrero bearing the figure of the Virgin stamped in
pewter, fastened to the band encircling it, which Alister Macdonald
found near a gigantic laurel bush, in the midst of the umbrageous
branches of which its owner lurked unseen.
"It is the hat of Cifuentes,—the vagabond of our last night's
adventure," said Alister, hewing a passage through the bushes with
his sword, and regaining the regiment.
"I would you had brought his head rather. O that it was within
the reach of my trusty stick! I would scorn to wet Andrea with his
base blood." A frown of rage contracted the broad brow of Campbell
while he spoke, holding in one hand a steel Highland pistol, which
he had drawn from his holsters for the purpose of executing dire
vengeance had opportunity offered.
"By all the powers above!" cried Alister, with fierce and stern
energy, "if ever this accursed Spaniard crosses my path, I will make
his head fly from his shoulders as I would a thistle from its stalk! nor
shall all the corregidors and alcaldes in Spain prevent me. But how is
Stuart? Poor fellow! he looks very pale. Has he lost much blood?"
Ronald, supported on the arm of Evan Iverach, stood erect
within a circle formed by the officers who crowded round, while one
of the regimental surgeons examined his left arm, which had been
wounded by the shot.
"O gude sake! be gentle wi' him, doctor!" said honest Evan in
great anguish, as he observed Ronald to wince under the hands of
the medical officer; "be as gentle wi' him as possible. You doctor folk
are unco rough ever and aye: dinna forget that he is your namesake,
and kinsman forbye, though ye canna find out the exact degree."
"I hope, Doctor Stuart, the wound is not a very bad one?" said
Cameron, dismounting from his horse and approaching the circle. "I
augur ill from the expression of concern which your countenance
wears."
"The shot has passed completely through, colonel, breaking the
bone in its passage; but as the fracture is not compound, it will soon
join after setting. I hope that none of the red coat, or any other
foreign body, is lodged in the wound."
"Oh, if it should be a poisoned ball!" groaned poor Evan in great
misery at the idea, while Doctor Stuart removed the sleeve of the
coat, and Ronald endeavoured to conceal the miniature of Alice Lisle,
which was nearly revealed by the disarrangement of his uniform.
"Oh, if it should be a poisoned ball!" he repeated.
"Some of our very best chields have been slain wi' them before
now,—especially at the battle of Arroya-del-Molino," observed his
comrade Angus Mackie, with a solemn shake of his head.
"Oh, that I had only been at his side! It micht have hit me in his
stead!"
"Silence, men! You chatter nonsense," said Cameron sternly.
"And what think you now, doctor?"
"That as Mr. Stuart is young, and of a full habit, I must bleed
him immediately."
"Stuff! My good fellow, he has lost blood enough already."
"I am the best judge of that, Colonel Cameron," replied
Esculapius haughtily; "delay is fraught with danger. Holloa, there!
where's the hospital attendant? Serjeant Maconush, undo the
service-case and bring me the pasteboard splints, the twelve-tailed
bandage, and other et cæteras: I will set the bone."
"It is impossible, Doctor Stuart," interposed Cameron. "Your
intentions are all very good; but your clansman must return to
Merida, where I sincerely hope he will be properly attended to. We
have no time to await your operations just now, for which I am truly
sorry, as Ensign Stuart will be well aware."
"Do not mind me, colonel," replied Ronald, whose teeth were
clenched with the agony he endured. "I will return, as you say, and
shall doubtless find a medical attendant. I hear the rear regiments
are clamorous at this stoppage in their front, and yonder is Sir
Rowland himself, advancing to discover the cause." He spoke with
difficulty, and at intervals; the new and painful sensation of a broken
limb, together with rage swelling his heart at the manner in which
he had received it, made his utterance low and indistinct. Among the
group around him he recognised Don Alvaro, who had galloped from
the rear to discover the meaning of the confusion.
"Senor coronel," said he to Cameron, raising his hand to the
peak of his helmet, "let him be taken to my house in Merida, where
he will be properly attended to. Pedro Gomez,"—turning to his
orderly serjeant,—"dismount. Give this cavalier your horse, and
attend him yourself to my residence in the Calle de Guadiana, and
desire Donna Catalina to have his wound looked after. You will
remain with him until it is healed."
Pedro sprung lightly from his saddle, into which Ronald was with
some difficulty installed.
"I thank you, senor," said Cameron, touching his bonnet, "and
am glad this disagreeable matter is so satisfactorily arranged; the
alcalde might have ordered him but an indifferent billet. Good bye,
my dear fellow, Stuart; I trust we shall see you soon again, and with
a whole skin. Mr. Grant, take the colours. Gentlemen, fall in; get into
your places, men—into your ranks. Forward!" He delivered his orders
with firm rapidity, and being a strict martinet who was not to be
trifled with, they were instantly obeyed, and the commotion was
hushed. The troops were too much accustomed to wounds and
slaughter to care about the hurt received by Ronald, but it was the
sudden and concealed shot which had raised their surprise and
indignation.
Evan Iverach alone delayed executing the orders of Cameron,
and entreated that he might be permitted to attend his wounded
master to the rear.
"My good fellow, it cannot be," replied the colonel, pleased with
the genuine concern manifested by Ronald's honest follower; "the
enemy are before us, and I cannot spare a man. Nay, now, you need
not entreat; fall into your place at once, sir."
"Oh! if you please, sir, dinna speak sae sternly. Did ye but ken
—"
"Into your place this instant, sir! or I will have you stripped of
your accoutrements, and sent prisoner to the quarter-guard,"
exclaimed Cameron sternly, his eyes beginning to sparkle. To say
more was useless, and shouldering his musquet with a heavy heart,
Evan took his place in the ranks, and moved forward with the rest;
but he cast many an anxious look to the rear, watching the retiring
figure of Ronald as he sat on the troop-horse, which was led by
Pedro Gomez towards the bridge of Merida.
CHAPTER X.
FLIRTATION.
More than one week had slipped away, and Ronald had nearly
recovered from his wound, though still obliged to keep his arm slung
in a scarf. In the garden at the back of the mansion, he was seated
by Catalina's side one evening on the steps of a splendid fountain,
where four brazen deities spouted the crystal liquid from their
capacious throats into a broad basin of black marble, from which, by
some subterraneous passage, it was carried to the Guadiana. The
spring was now advanced, and the delightful climate of Spain was
fast arraying nature, and bringing her forth in all her glory. From the
fountain, broad gravelled walks, thickly edged with myrtle, branched
off in every direction, and between them were beds where the
crimson geranium, the gigantic rose bushes, the pale lilac blossom,
and a thousand other garden flowers, which it would be useless to
mention, were budding in the heat of the vernal sun by day, and in
the soft moist dews by night. Around and above them the graceful
willow, the tufted accacia, the stately palm, the orange-tree with its
singularly beautiful leaves, and numerous other shrubs, were
spreading into foliage, which appeared to increase daily in richness
of tint and variety; and beautiful vistas, winding walks, and
umbrageous bowers were formed among them with all the art and
nicety of Spanish landscape gardening.
The young Highlander and Catalina were seated on the margin
of the fountain, as I have already said. They conversed but little.
The donna busied herself with the strings of her guitar, and Ronald
watched in silence the nimble motions of her white hands as she tied
and untied, screwed and unscrewed the strings and pegs, and struck
the chords to ascertain the true tone. Strange and conflicting
thoughts flitted through his mind while he gazed upon his beautiful
companion. He was aware how dangerous to his peace her presence
was, and he almost longed for, yet dreaded the coming time, when
he should be obliged to return to his regiment. To Alice Lisle he felt
that he was bound by every tie that early intimacy, love, and honour
could twine around him,—honour! how could he think of so cold a
word? and while he did so, he blushed that he could find room in his
heart for the image of another.
"Catalina is very beautiful—decidedly so," thought he, while he
viewed the curve of her white neck, and the outline of her superb
bust. "Her face is one of surpassing loveliness, and her eyes—but
Alice is equally bewitching, although perhaps a less showy beauty.
Alice is very gentle and winning, so lady-like, and we have known
each other so long,—it is impossible I can forget her. Why, then,
have I been trifling with one whose presence is so dangerous to my
peace? Yes! if I would preserve a whole heart and my allegiance to
Alice, I must fly from you, Catalina."
While he reasoned thus with himself, Catalina raised her dark
and laughing eyes to his, while she struck the chords of her
instrument, and sang a few words of a very beautiful Spanish air. So
melodious was her tone, so graceful her manner, so winning the
expression of eye, who can wonder that Ronald's resolution melted
like snow in the sunshine, and that he felt himself vanquished? Poor
Alice! With an air of tenderness and embarrassment he took the little
hand of the donna within his own. She read in his eye the thoughts
which passed through his mind; she cast down her long jetty lashes,
while a rich bloom suffused her soft cheek. Ronald was about to
murmur forth something—in fact he knew not what, when a loud
knocking at the outer gate of the mansion, and the sound of a well-
known voice, aroused him.
"Unbar the yett—this instant! ye auld doited gomeral! I will see
my maister in spite o' ye," cried Evan impatiently, while Agnes
delayed unbarring the door to so boisterous a visitor.
"Caramba, senor! Quien es?" she repeated.
"Gude wife, I speak nae language but my ain; so ye needna
waste your wind by speirin' questions that I canna answer."
At Ronald's desire the old housekeeper undid the door, which
was well secured by many a bar and lock, and he immediately saw
the waving plumes of Evan's bonnet dancing above the shrubbery,
as he came hastily towards the fountain, with his musquet at the
long trail, and his uniform and accoutrements covered with the dust
of a long day's march. His joy was unbounded on seeing his master,
and rapid and quick were the earnest inquiries he made, without
waiting for answers, concerning his wound, and how he had been
treated "by the unco folk he had been left to bide amang,—begging
the bonnie leddy's pardon."
Catalina bowed,—although she knew not a word that he said;
but by the natural politeness and expression of the soldier's look,
she knew that he referred to her.
"Now then, Evan, that I have answered all your inquiries, be
pleased to stand steady, and moderate yourself so far as to reply to
mine," said Ronald kindly, far from feeling annoyed at his
appearance at a juncture so peculiarly awkward and tender. "How
come you here just now? and how alone?"
"I got leave frae the colonel, after an unco dunning, to come
here and attend you, for I thocht you would feel yersel unco queer,
left alane among the black-avised folk, that canna speak a decent
tongue. But here, sir, is a letter and a newspaper, sent you by
Maister Macdonald." Evan, after fumbling among the ration biscuits,
shoe-brushes, and other matters which crammed his havresack,
produced them. "Just as I cam awa' frae the place whar' the
regiment lay, in dreary strath—a place like Corrie-oich for a' the
world—seventy miles frae this, I heard that the order had come to
retire to the rear—"
"Upon Merida?"
"I canna say, sir, because the very moment that Cameron gied
me leave, and Maister Macdonald gied me his letter, I set off, and
have travelled nicht and day, without stopping, except may be just
for an hour, to sleep by the road side or to get a mouthfu o' meat,—
trash sic as ane wadna gie to puir auld Hector the watch-dog at
hame, at auld Lochisla. O it was a far and a weary gait; but I was
sae anxious to see ye, sir, that I have trod it out in twa days, in
heavy marching order as ye see me, and I am like to dee wi' sheer
fatigue."
"You are a faithful fellow, Evan; but I fear, by your love for me,
you may work mischief to yourself. Here comes Dame Agnes,—to
her care I must consign you. She was a kind attendant to me when I
much wanted one."
"God bless ye for that, gude wife!" cried Iverach, catching her in
his arms and kissing her withered cheek; a piece of gallantry which
she owed more to Evan's native drollery and his present state of
excitement, than any admiration of her person.
"I believe there is some gaucy kimmer at home, who would not
like this distribution of favour, Evan," said Ronald; while Catalina
clapped her hands and laughed heartily at the old dame, who,
although very well pleased at the compliment, affected great
indignation, and arranged her velvet hood with a mighty air.
"It's just quiet friendship for the auld body,—naething else, sir.
Even puir wee Jessie Cavers wadna hae been angry, had she been
present and seen me."
"Cavers—Jessie Cavers! I heard that name before, surely?"
"It's very like ye may, sir," replied the young Highlander, a flush
crossing his cheek. "She is Miss Alice Lisle's maid,—a servant lassie
at the Inch-house."
"O—a girl at Inchavon? I thought the name was familiar to me,"
faltered Ronald, reddening in turn. "But you had better retire, and
tell the military news to Pedro Gomez, whom I see waiting you
impatiently yonder."
Reserving the newspaper for another time, Ronald, with the
donna's permission, opened Macdonald's letter.
"This billet is from the army," said she, familiarly placing her
arm through the young officer's and drawing close to his side, while
she caused his heart to thrill at her touch. "Ah! tell me if there is any
news of my brother Alvaro in it?"
"I will read it aloud, translating those parts you do not
understand. It is dated from Villa Franca:—[*]
[*] The date of poor Macdonald's letter is now obliterated, and I have forgotten
what it was,—about the month of March (1812), I think.
"DEAR STUART,
"Fassifern and the rest of ours are anxious to know how you are,
after that wound you received so villanously, and from which I hope
you are almost recovered by this time. Send us word by the first
messenger from Merida to the front. Remember me particularly to
the fair Catalina, and I assure you that your quarters at present in
her splendid mansion, are very different from mine here,—in a
wretched hut, where the rain comes in at the roof, and the wind at a
thousand crannies. You may congratulate us, my old comrade, on
the easy victories we obtain over Messieurs the French, who have
been driven from Almendralejo, and all the places adjacent, with
little loss on our part. I now write you from a village, out of which
our brigade drove them a few days ago. How much you would have
admired the gallantry of our Spanish friend Don Alvaro, who
accompanied us in this affair. On our approaching the enemy, they
retired without firing a shot at first, and his troop of lancers, who
were halted on the road leading to Los Santos, charged them at full
gallop, shouting Viva Ferdinand! España! España y buena
Esperanza!"
"Noble Alvaro! my brave brother!" interrupted Catalina, her eyes
sparkling with delight. "I will always love this officiale for what he
says. Oh! that Inesella was here! She is betrothed to Alvaro, senor,
and would have been wedded long since, but for a quarrel they had
about Donna Ermina, the wife of old Salvador, the guerilla chief."
"It was a noble sight," continued the letter, "to see the tall
lances levelled to the rest, the steel helmets flashing in the sun, and
to hear the clang of the rapid hoofs, as the Spaniards rushed down
the brae and broke upon the enemy with the force of a whirlwind, a
thunderbolt, or any thing else you may suppose. Campbell protested
it equalled the charge of the Mamelukes, when he 'was in Egypt with
Sir Ralph.' Alvaro has now gone off to join Murillo, where he hopes
to meet Don Salvador de Zagala, whom he vows to impale alive. He
left me but an hour ago, and desires me in my letter to send a kiss
to his sister. This, I dare swear, you will be most happy to deliver."
Ronald faltered, and turned his eye on Catalina, who blushed
deeply. It was impossible to resist the temptation; her face was very
close to his, and he pressed his lips upon her burning cheek.
"Read on, senor mio," she said, disengaging herself with
exquisite grace; "perhaps there may be more about Alvaro?"
Ronald glanced his eye over the next paragraph, and passed it
over in silence and confusion.
"A little flirtation en passant, you know, will not injure your
allegiance to the fair ladye whose miniature—but you may burn my
letter without reading further, should I write much on that subject.
Angus Mackie, a private of your company, was the other night
engaged in a regular brawl with the natives of Almendralejo,—some
love affair with the daughter of an old abogado (lawyer). I refer you
for the particulars to the bearer, who was engaged in it. We had
another row at Almendralejo the day we entered it. Some Spaniard,
by way of insult, ran his dagger into the bag of Ranald Dhu's pipe,
and so great was the wrath of the 'Son of the Mist,' that he dirked
him on the spot; and although the fellow is not dead, he is declared
by Doctor Stuart to be 'in a doubtful state.'
"I have sent you an Edinburgh paper, (a month or two old,)
wherein you will see by the 'Gazette' that a Louis Lisle has been
appointed to us, vice poor Oliphant Cassilis, killed in the battle of
Arroya. There are people of the name in Perthshire; perhaps you
may know something of this Lisle."
The blood rushed into Ronald's face, and a mixed feeling of
pleasure and shame to meet the brother of Alice filled his mind. He
read on—
"I was just about to conclude this long letter, when some
strange news arrived. Ciudad Rodrigo has been invested, and it is
supposed must capitulate soon. Our division has been ordered by
Lord Wellington to retire into Portugal forthwith; the 'gathering' is at
this moment ringing through the streets of Villa Franca, and the
corps is getting under arms.—Adieu, &c.
ALISTER MACDONALD."
CHAPTER XI.
ALICE LISLE.—NEWS FROM HOME.
"As you are beauteous, were you half so true,
Here could I live, and love, and die for only you.
Now I to fighting fields am sent afar,
And strive in winter camps with toils of war;
While you, alas, that I should find it so!—"
Virgil, Pastoral x.
Within the chamber which he occupied Ronald sat late that night,
musing on what was to be done, and what course was now to be
steered. He saw that it was absolutely necessary that he should
proceed instantly to rejoin,—a measure which the healed state of his
wound rendered imperative. "The division is retreating," thought he,
"and the Count D'Erlon will without doubt push forward immediately
and regain possession of Merida, and I must inevitably be taken
prisoner. I will join Sir Rowland as he passes through; the troops
must pass here en route for Portugal. How dangerous to my own
quiet is my acquaintance with Catalina, and how foolishly have I
been tampering with her affections and with my own heart! Good
heavens! I have acted very wrong in awakening in her a sentiment
towards me, which my plighted troth to Alice and my own natural
sense of honour forbid me to cherish or return. And Catalina loves
me; her blushes, her downcast eyes, and her sweet confusion have
betrayed it more than once. 'Tis very agreeable to feel one's self
beloved, and by so fair a girl, for Catalina is very beautiful; but I
must fly from her, and break those magic spells which are linking our
hearts together. To-morrow—no, the day after, I will leave Merida,
and join the division as soon as I hear by what route it is retiring."
Louis Lisle, too, the brother of Alice, was now an officer in the
same corps, and his bold spirit would instantly lead him to seek
vengeance for any false or dishonourable part acted towards his
sister. "Poor Louis! he is the first friend I ever had; and how will so
delicate a boy, one so tenderly nurtured, endure the many miseries
of campaigning here? A single night such as that we spent in the
bivouac of La Nava, would unquestionably be his death."
Here his cogitations were interrupted by the voice of Evan, who
was carousing in the room below with Gomez, (having spent the
night together over their cups, although neither understood a word
of the other's language), singing loud and boisterously,—
* * * * *
He awoke suddenly, and found that he had been asleep in his chair.
The bright light of the morning sun was streaming between the dark
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.
textbookfull.com