Data Structures And Problem Solving Using Java 4th Edition by Mark Weiss 0321541405 9780321541406 pdf download
Data Structures And Problem Solving Using Java 4th Edition by Mark Weiss 0321541405 9780321541406 pdf download
https://ebookball.com/product/data-structures-and-problem-
solving-using-java-4th-edition-by-mark-
weiss-0321541405-9780321541406-17186/
Data Structures and Problem Solving Using Java 4th edition by Mark
Allen Weiss ISBN 0321541405 978-0321541406
https://ebookball.com/product/data-structures-and-problem-
solving-using-java-4th-edition-by-mark-allen-weiss-
isbn-0321541405-978-0321541406-16342/
Data Structures and Problem Solving Using C++ 2nd edition by MALIK
ISBN 0324782012 978-0324782011
https://ebookball.com/product/data-structures-and-problem-
solving-using-c-2nd-edition-by-malik-
isbn-0324782012-978-0324782011-16350/
https://ebookball.com/product/data-structures-and-algorithm-
analysis-in-c-4th-edition-by-mark-
weiss-013284737x-9780132847377-15292/
https://ebookball.com/product/problem-solving-in-data-structures-
and-algorithms-using-c-1st-edition-by-hemant-jain-
isbn-9352655915-9789352655915-15768/
Problem Solving in Data Structures and Algorithms Using C 1st Edition
by Hemant Jain ISBN 1540407306 9781540407306
https://ebookball.com/product/problem-solving-in-data-structures-
and-algorithms-using-c-1st-edition-by-hemant-jain-
isbn-1540407306-9781540407306-15866/
https://ebookball.com/product/data-structures-and-algorithm-
analysis-in-javatm-3rd-edition-by-mark-
weiss-9780133465013-0133465012-18710/
Programming and Problem Solving With Java 1st Edition by Nell Dale,
Chip Weems, Mark Headington ISBN 0763730696 9780763730697
https://ebookball.com/product/programming-and-problem-solving-
with-java-1st-edition-by-nell-dale-chip-weems-mark-headington-
isbn-0763730696-9780763730697-15872/
https://ebookball.com/product/outlines-and-highlights-for-data-
structures-and-algorithm-analysis-in-c-3rd-edition-by-mark-allen-
weiss-isbn-032144146x-9780321441461-16464/
https://ebookball.com/product/data-structures-abstraction-and-
design-using-java-2rd-edition-by-elliot-koffman-paul-
wolfgang-9781119239147-15300/
Data Structures &
Problem Solving
Using Java
fourth edition
This page intentionally left blank
Data Structures &
Problem Solving
Using Java
fourth edition
ISBN-13: 9780321541406
ISBN-10: 0321541405
1 2 3 4 5 6 7 8 9 10⎯CRS⎯12 11 10 09
To David and David.
This page intentionally left blank
preface
preface
T his book is designed for a two-semester sequence in computer science,
beginning with what is typically known as Data Structures and continuing
with advanced data structures and algorithm analysis. It is appropriate for the
courses from both the two-course and three-course sequences in “B.1 Intro-
ductory Tracks,” as outlined in the final report of the Computing Curricula
2001 project (CC2001)—a joint undertaking of the ACM and the IEEE.
The content of the Data Structures course has been evolving for some
time. Although there is some general consensus concerning topic coverage,
considerable disagreement still exists over the details. One uniformly
accepted topic is principles of software development, most notably the con-
cepts of encapsulation and information hiding. Algorithmically, all Data
Structures courses tend to include an introduction to running-time analysis,
recursion, basic sorting algorithms, and elementary data structures. Many uni-
versities offer an advanced course that covers topics in data structures, algo-
rithms, and running-time analysis at a higher level. The material in this text
has been designed for use in both levels of courses, thus eliminating the need
to purchase a second textbook.
Although the most passionate debates in Data Structures revolve around
the choice of a programming language, other fundamental choices need to be
made:
summary of changes
in the fourth edition
1. This edition provides additional discussion on using classes (Chapter 2),
writing classes (Chapter 3), and interfaces (Chapter 4).
2. Chapter 6 contains additional material discussing the running time of
lists, the use of maps, and the use of views in the Java Collections API.
3. The Scanner class is described, and code throughout the text makes use
of the Scanner class.
4. Chapter 9 describes and implements the 48-bit linear congruential gener-
ator that is part of both the Java and many C++ libraries.
5. Chapter 20 has new material on separate chaining hash tables and the
String hashCode method.
6. There are numerous revisions to the text that improve on the prose in the
previous edition.
7. Many new exercises are provided in Parts I, II, and IV.
a unique approach
My basic premise is that software development tools in all languages come with
large libraries, and many data structures are part of these libraries. I envision an
eventual shift in emphasis of data structures courses from implementation to
preface ix
use. In this book I take a unique approach by separating the data structures into
their specification and subsequent implementation and taking advantage of an
already existing data structures library, the Java Collections API.
A subset of the Collections API suitable for most applications is discussed
in a single chapter (Chapter 6) in Part Two. Part Two also covers basic analy-
sis techniques, recursion, and sorting. Part Three contains a host of applica-
tions that use the Collections API’s data structures. Implementation of the
Collections API is not shown until Part Four, once the data structures have
already been used. Because the Collections API is part of Java, students can
design large projects early on, using existing software components.
Despite the central use of the Collections API in this text, it is neither a book
on the Collections API nor a primer on implementing the Collections API spe-
cifically; it remains a book that emphasizes data structures and basic problem-
solving techniques. Of course, the general techniques used in the design of data
structures are applicable to the implementation of the Collections API, so sev-
eral chapters in Part Four include Collections API implementations. However,
instructors can choose the simpler implementations in Part Four that do not dis-
cuss the Collections API protocol. Chapter 6, which presents the Collections
API, is essential to understanding the code in Part Three. I attempted to use only
the basic parts of the Collections API.
Many instructors will prefer a more traditional approach in which each
data structure is defined, implemented, and then used. Because there is no
dependency between material in Parts Three and Four, a traditional course can
easily be taught from this book.
prerequisites
Students using this book should have knowledge of either an object-oriented
or procedural programming language. Knowledge of basic features, including
primitive data types, operators, control structures, functions (methods), and
input and output (but not necessarily arrays and classes) is assumed.
Students who have taken a first course using C++ or Java may find the first
four chapters “light” reading in some places. However, other parts are definitely
“heavy” with Java details that may not have been covered in introductory courses.
Students who have had a first course in another language should begin at
Chapter 1 and proceed slowly. If a student would like to use a Java reference
book as well, some recommendations are given in Chapter 1.
Knowledge of discrete math is helpful but is not an absolute prerequi-
site. Several mathematical proofs are presented, but the more complex
proofs are preceded by a brief math review. Chapters 7 and 19–24 require
x preface
java
This textbook presents material using the Java programming language. Java
is a language that is often examined in comparison with C++. Java offers
many benefits, and programmers often view Java as a safer, more portable,
and easier-to-use language than C++.
The use of Java requires that some decisions be made when writing a text-
book. Some of the decisions made are as follows:
1. The minimum required compiler is Java 5. Please make sure you are
using a compiler that is Java 5-compatible.
2. GUIs are not emphasized. Although GUIs are a nice feature in Java,
they seem to be an implementation detail rather than a core Data
Structures topic. We do not use Swing in the text, but because many
instructors may prefer to do so, a brief introduction to Swing is pro-
vided in Appendix B.
3. Applets are not emphasized. Applets use GUIs. Further, the focus of
the course is on data structures, rather than language features. Instruc-
tors who would like to discuss applets will need to supplement this
text with a Java reference.
4. Inner classes are used. Inner classes are used primarily in the imple-
mentation of the Collections API, and can be avoided by instructors
who prefer to do so.
5. The concept of a pointer is discussed when reference variables are
introduced. Java does not have a pointer type. Instead, it has a refer-
ence type. However, pointers have traditionally been an important
Data Structures topic that needs to be introduced. I illustrate the
concept of pointers in other languages when discussing reference
variables.
6. Threads are not discussed. Some members of the CS community
argue that multithreaded computing should become a core topic in the
introductory programming sequence. Although it is possible that this
will happen in the future, few introductory programming courses dis-
cuss this difficult topic.
preface xi
text organization
In this text I introduce Java and object-oriented programming (particularly
abstraction) in Part One. I discuss primitive types, reference types, and some
of the predefined classes and exceptions before proceeding to the design of
classes and inheritance.
In Part Two, I discuss Big-Oh and algorithmic paradigms, including
recursion and randomization. An entire chapter is devoted to sorting, and a
separate chapter contains a description of basic data structures. I use the Col-
lections API to present the interfaces and running times of the data structures.
At this point in the text, the instructor may take several approaches to present
the remaining material, including the following two.
1. Discuss the corresponding implementations (either the Collections
API versions or the simpler versions) in Part Four as each data struc-
ture is described. The instructor can ask students to extend the classes
in various ways, as suggested in the exercises.
2. Show how each Collections API class is used and cover implementa-
tion at a later point in the course. The case studies in Part Three can
be used to support this approach. As complete implementations are
available on every modern Java compiler, the instructor can use the
Collections API in programming projects. Details on using this
approach are given shortly.
Part Five describes advanced data structures such as splay trees, pairing
heaps, and the disjoint set data structure, which can be covered if time permits
or, more likely, in a follow-up course.
the general concept of a pointer—even though Java does not have pointers—so
that students learn this important Data Structures topic. Several of the basic
reference types (strings, arrays, files, and Scanners) are illustrated, and the use
of exceptions is discussed. Chapter 3 continues this discussion by describing
how a class is implemented. Chapter 4 illustrates the use of inheritance in
designing hierarchies (including exception classes and I/O) and generic com-
ponents. Material on design patterns, including the wrapper, adapter, and dec-
orator patterns can be found in Part One.
Part Two focuses on the basic algorithms and building blocks. In
Chapter 5 a complete discussion of time complexity and Big-Oh notation
is provided. Binary search is also discussed and analyzed. Chapter 6 is
crucial because it covers the Collections API and argues intuitively what
the running time of the supported operations should be for each data struc-
ture. (The implementation of these data structures, in both Collections
API-style and a simplified version, is not provided until Part Four). This
chapter also introduces the iterator pattern as well as nested, local, and
anonymous classes. Inner classes are deferred until Part Four, where they
are discussed as an implementation technique. Chapter 7 describes recur-
sion by first introducing the notion of proof by induction. It also discusses
divide-and-conquer, dynamic programming, and backtracking. A section
describes several recursive numerical algorithms that are used to imple-
ment the RSA cryptosystem. For many students, the material in the second
half of Chapter 7 is more suitable for a follow-up course. Chapter 8
describes, codes, and analyzes several basic sorting algorithms, including
the insertion sort, Shellsort, mergesort, and quicksort, as well as indirect
sorting. It also proves the classic lower bound for sorting and discusses the
related problems of selection. Finally, Chapter 9 is a short chapter that dis-
cusses random numbers, including their generation and use in randomized
algorithms.
Part Three provides several case studies, and each chapter is organized
around a general theme. Chapter 10 illustrates several important techniques
by examining games. Chapter 11 discusses the use of stacks in computer lan-
guages by examining an algorithm to check for balanced symbols and the
classic operator precedence parsing algorithm. Complete implementations
with code are provided for both algorithms. Chapter 12 discusses the basic
utilities of file compression and cross-reference generation, and provides a
complete implementation of both. Chapter 13 broadly examines simulation by
looking at one problem that can be viewed as a simulation and then at the
more classic event-driven simulation. Finally, Chapter 14 illustrates how data
preface xiii
chapter dependencies
Generally speaking, most chapters are independent of each other. However,
the following are some of the notable dependencies.
n Part One (Tour of Java): The first four chapters should be covered in their
entirety in sequence first, prior to continuing on to the rest of the text.
n Chapter 5 (Algorithm Analysis): This chapter should be covered prior
to Chapters 6 and 8. Recursion (Chapter 7) can be covered prior to
this chapter, but the instructor will have to gloss over some details
about avoiding inefficient recursion.
n Chapter 6 (The Collections API): This chapter can be covered prior to
or in conjunction with material in Part Three or Four.
n Chapter 7 (Recursion): The material in Sections 7.1–7.3 should be
covered prior to discussing recursive sorting algorithms, trees, the
Tic-Tac-Toe case study, and shortest-path algorithms. Material such
as the RSA cryptosystem, dynamic programming, and backtracking
(unless Tic-Tac-Toe is discussed) is otherwise optional.
n Chapter 8 (Sorting Algorithms): This chapter should follow Chapters
5 and 7. However, it is possible to cover Shellsort without Chapters 5
and 7. Shellsort is not recursive (hence there is no need for Chapter 7),
and a rigorous analysis of its running time is too complex and is not
covered in the book (hence there is little need for Chapter 5).
n Chapter 15 (Inner Classes and Implementations of ArrayLists):
This material should precede the discussion of the Collections API
implementations.
n Chapters 16 and 17 (Stacks and Queues/Linked Lists): These chapters
may be covered in either order. However, I prefer to cover Chapter 16
first because I believe that it presents a simpler example of linked lists.
n Chapters 18 and 19 (Trees/ Binary Search Trees): These chapters can
be covered in either order or simultaneously.
separate entities
The other chapters have little or no dependencies:
mathematics
I have attempted to provide mathematical rigor for use in Data Structures
courses that emphasize theory and for follow-up courses that require more
analysis. However, this material stands out from the main text in the form of
separate theorems and, in some cases, separate sections or subsections. Thus
it can be skipped by instructors in courses that deemphasize theory.
In all cases, the proof of a theorem is not necessary to the understanding
of the theorem’s meaning. This is another illustration of the separation of an
interface (the theorem statement) from its implementation (the proof). Some
inherently mathematical material, such as Section 7.4 (Numerical Applica-
tions of Recursion), can be skipped without affecting comprehension of the
rest of the chapter.
course organization
A crucial issue in teaching the course is deciding how the materials in Parts
Two–Four are to be used. The material in Part One should be covered in
depth, and the student should write one or two programs that illustrate the
design, implementation, testing of classes and generic classes, and perhaps
object-oriented design, using inheritance. Chapter 5 discusses Big-Oh nota-
tion. An exercise in which the student writes a short program and compares
the running time with an analysis can be given to test comprehension.
In the separation approach, the key concept of Chapter 6 is that different
data structures support different access schemes with different efficiency. Any
case study (except the Tic-Tac-Toe example that uses recursion) can be used
xvi preface
to illustrate the applications of the data structures. In this way, the student can
see the data structure and how it is used but not how it is efficiently imple-
mented. This is truly a separation. Viewing things this way will greatly
enhance the ability of students to think abstractly. Students can also provide
simple implementations of some of the Collections API components (some
suggestions are given in the exercises in Chapter 6) and see the difference
between efficient data structure implementations in the existing Collections
API and inefficient data structure implementations that they will write. Stu-
dents can also be asked to extend the case study, but again, they are not
required to know any of the details of the data structures.
Efficient implementation of the data structures can be discussed after-
ward, and recursion can be introduced whenever the instructor feels it is
appropriate, provided it is prior to binary search trees. The details of sorting
can be discussed at any time after recursion. At this point, the course can con-
tinue by using the same case studies and experimenting with modifications to
the implementations of the data structures. For instance, the student can
experiment with various forms of balanced binary search trees.
Instructors who opt for a more traditional approach can simply discuss a
case study in Part Three after discussing a data structure implementation in
Part Four. Again, the book’s chapters are designed to be as independent of
each other as possible.
exercises
Exercises come in various flavors; I have provided four varieties. The basic In
Short exercise asks a simple question or requires hand-drawn simulations of an
algorithm described in the text. The In Theory section asks questions that either
require mathematical analysis or asks for theoretically interesting solutions to
problems. The In Practice section contains simple programming questions,
including questions about syntax or particularly tricky lines of code. Finally,
the Programming Projects section contains ideas for extended assignments.
pedagogical features
n Margin notes are used to highlight important topics.
n The Key Concepts section lists important terms along with definitions
and page references.
preface xvii
n The Common Errors section at the end of each chapter provides a list
of commonly made errors.
n References for further reading are provided at the end of most chapters.
supplements
A variety of supplemental materials are available for this text. The following
resources are available at http://www.aw.com/cssupport for all readers of this
textbook:
n Source code files from the book. (The On the Internet section at the
end of each chapter lists the filenames for the chapter’s code.)
acknowledgments
Many, many people have helped me in the preparation of this book. Many
have already been acknowledged in the prior edition and the related C++ ver-
sion. Others, too numerous to list, have sent e-mail messages and pointed out
errors or inconsistencies in explanations that I have tried to fix in this edition.
For this edition I would like to thank my editor Michael Hirsch, editorial
assistant Stephanie Sellinger, senior production supervisor Marilyn Lloyd,
and project manager Rebecca Lazure and her team at Laserwords. Thanks
also go to Allison Michael and Erin Davis in marketing and Elena Sidorova
and Suzanne Heiser of Night & Day Design for a terrific cover.
Some of the material in this text is adapted from my textbook Efficient C
Programming: A Practical Approach (Prentice Hall, 1995) and is used with
xviii preface
M. A. W.
Miami, Florida
contents
3.8 packages 90
3.8.1 the import directive 91
3.8.2 the package statement 93
3.8.3 the CLASSPATH environment variable 94
3.8.4 package visibility rules 95
3.9 a design pattern: composite (pair) 95
summary 96
key concepts 97
common errors 100
on the internet 100
exercises 101
references 107
summary 383
key concepts 384
common errors 385
on the internet 385
exercises 385
references 391
exercises 565
references 569
summary 833
key concepts 834
common errors 834
on the internet 835
exercises 835
references 839
Venganza
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.
Language: Spanish
PÍO BAROJA
MEMORIAS DE UN HOMBRE DE ACCIÓN
El aprendiz de conspirador.
El escuadrón del Brigante.
Los caminos del mundo.
Con la pluma y con el sable.
Los recursos de la astucia.
La ruta del aventurero.
Los contrastes de la vida.
La veleta de Gastizar.
Los caudillos de 1830.
La Isabelina.
El sabor de la venganza.
MEMORIAS DE UN HOMBRE
DE ACCIÓN
EL SABOR DE LA VENGANZA
ES PROPIEDAD
DERECHOS RESERVADOS
PARA TODOS LOS PAÍSES
COPYRIGHT BY
RAFAEL CARO RAGGIO
1921
Establecimiento tipográfico
de Rafael Caro Raggio
PÍO BAROJA
EL SABOR DE LA VENGANZA
SEGUNDA EDICIÓN
RAFAEL CARO RAGGIO
EDITOR
MENDIZÁBAL, 34
MADRID
PRÓLOGO
Hablemos un poco.
Goethe.
Estas historias violentas de sangre—dice nuestro amigo Leguía—me
las contó Aviraneta en San Leonardo, un pueblo de la provincia de
Soria, adonde don Eugenio iba a veranear los últimos años de su
vida. Yo solía ir a ver a Aviraneta con frecuencia cuando estaba en
Madrid y vivía en la calle del Barco. Aviraneta era ya viejo en este
tiempo: andaba cerca de los ochenta años; y yo, aunque más joven
que él, sentía que también para mí había pasado la época de la
acción y del entusiasmo. Los dos, solitarios y olvidados,
recordábamos nuestros tiempos, que nos parecían mejores que
aquellos en que vivíamos.
Josefina, la mujer de don Eugenio, una francesa de Toulouse, con la
que se había casado, ya viejo, me decía que no dejara de visitar a su
marido.
—El pobre se aburre y a usted le quiere como a un hijo—me
indicaba la francesa.
—Yo voy a verle siempre que puedo.
—¡Está tan abandonado!—añadía ella.
En la época de la guerra francoprusiana, Josefina me escribió que
don Eugenio estaba en San Leonardo, un poco delicado de salud, y
que se quedaba allí hasta reponerse.
Fuí a verle a don Eugenio al pueblo y lo encontré ya bien.
Pensaba volver en seguida a Madrid; pero me sorprendió una gran
borrasca de frío y nieve y tuve que quedarme allí unos días hasta
que pasara.
San Leonardo es un pueblo entre pinares, al lado de un cerro
coronado por las ruinas de un castillo. Don Eugenio vivía en casa del
nieto de un guerrillero del Cura Merino, a quien llamaban el tío
Chaparro.
El tío Chaparro era dueño de grandes rebaños y tenía una hermosa
casa de piedra con una cocina ancha, que cogía casi la mitad del
piso bajo.
El hijo del guerrillero miraba a don Eugenio como a un héroe, y más
que como a un héroe, como a un sabio: le escuchaba
religiosamente, mandaba que todo el mundo le obedeciese y le
ponía un gran sillón de cuero al lado de la lumbre. De noche, en la
cocina, solía haber gran reunión de cabreros y de zagales que, por
sus indumentarias toscas, sus túnicas como dalmáticas y sus capotes
de lana cruda con capucha, me parecían pastores de nacimiento.
Aviraneta y yo solíamos tener largas charlas al lado del fuego, en las
que recordábamos sucesos políticos, y nuestras conversaciones las
escuchaban con gran curiosidad los pastores.
Aviraneta se entretenía escribiendo una relación de sus aventuras de
guerrillero de la guerra de la Independencia, las que pensaba
cándidamente ofrecer como ejemplo a los franceses, para que viesen
la manera de rechazar la invasión alemana.
Yo, entonces, estaba leyendo por primera vez la Biblia, en la
traducción de Cipriano de Valera, y hacía comentarios acerca de sus
máximas y de sus reflexiones, y, a pesar de que soy un espíritu muy
poco bíblico, me entretenía la lectura, aunque muchas veces me
repugnaba.
Un día le dije a don Eugenio:
—No me ha contado usted nunca con detalles su vida en la Cárcel
de Corte el año 1834.
—¿Qué voy a contar de allí? Era la mía una vida monótona y siempre
igual. En la cárcel los días se parecen demasiado uno a otro. Se vive
recordando lo que ha pasado y pensando en lo que se va a hacer al
salir de la prisión.
—Cuénteme usted con detalles todo cuanto recuerde de la cárcel y
de su vida en ella.
—No creo que sea muy interesante, pero te lo contaré.
Los datos que me dió Aviraneta de su estancia en la Cárcel de Corte
no fueron ni muy nuevos ni de gran interés.
Si los menciono aquí es porque la Cárcel de Corte sirve de marco a
las historias sangrientas que siguen después.
I.
EL CALAMAR
Sobre mi cabeza,
¡escuchad! Escuchad los
gritos prolongados y
frenéticos de aquellos
cuyo cuerpo y cuya alma
son igualmente cautivos.
Lord Byron: La
lamentación del Taso.
SOLO
LA CÁRCEL
El PADRE ANSELMO
LUCHAS
La Cárcel de Corte tenía tres patios, que servían para que pasearan
los presos. El primero se hallaba dentro del edificio actual, y tenía
alrededor oficinas y cuartos para nosotros los políticos; el segundo
estaba entre los dos cuerpos del edificio, el que queda y el
derribado, que daba a la calle de la Concepción Jerónima.
A los lados de éste se levantaban unos pabellones abovedados,
horriblemente sucios y siniestros. A uno de ellos lo llamaban la
Grillera. Allí solían estar encerrados los ladrones, y, en una especie
de jaula, se metían todas las noches a los muchachos jóvenes y a
los niños, jaula que se llamaba la Gallinería. De este patio central se
pasaba a otro, pequeño y profundo, que daba hacia la calle de la
Concepción Jerónima, y que había sido el antiguo cementerio de los
Padres del Salvador. Cortando el edificio había un callejón estrecho,
el callejón del Verdugo, por el cual entraba el ejecutor de la Justicia
cuando tenía que acompañar a algún reo a la horca.
Hacia la Concepción Jerónima había calabozos irregulares, obscuros,
que se destinaban a los grandes criminales y asesinos, y más atrás,
una pequeña capilla para los condenados a muerte, en la cual se les
tenía tres días.
Los presos del segundo patio vivían horriblemente: a muchos no les
llegaba el rancho; si tenían algún dinero podían recurrir a una
cantina, donde estaba todo carísimo; si no, se quedaban sin comer.
Un preso murió de hambre en un calabozo. Aquel calabozo se le
llamó el del Olvido.
Era el tercer calabozo célebre de la cárcel; había otros dos que
tenían nombre: el de La Sed y el del Dragón.
Cuando yo visité el segundo patio, en el calabozo del Olvido había
un idiota vagabundo a quien tenían que traspasar al hospital. Este
idiota chillaba y cantaba y hacía reír a los presos, que le
consideraban como un hombre feliz.
Los criminales audaces conseguían allí lo que querían: comían bien,
bebían, tenían armas y hacían que les visitasen las mujeres del otro
departamento.
Paco el Sastre, a quien, como digo, Candelas me había
recomendado, me hizo conocer a dos raterillos a quienes exigió que
me obedecieran como a su jefe. Uno de éstos era el Gacetilla, un
chico que llamaban así porque sabía todo cuanto ocurría dentro y
fuera de la cárcel, y el otro, el Mambrú, un gimnasta que andaba
con las manos y daba saltos mortales.
Por estos muchachos pude comunicarme libremente con mis amigos
de fuera. Uno de los procedimientos que tenían era cantar. Un preso
cantaba una copla, en la que decía disimuladamente lo que quería, y
al día siguiente se ponía un ciego con la guitarra en la Concepción
Jerónima, y en la canción que entonaba venía la respuesta.
Con Paco el Sastre comencé a organizar una campaña contra el
alcaide y los carceleros carlistas. Los presos del segundo patio se
dividieron también en liberales y carlistas; pero aquí las fuerzas
estaban equilibradas.
Entre aquellos bandidos y estafadores, la influencia de un
lugarteniente de Candelas, como Paco el Sastre, era decisiva. Yo les
ayudé lo que pude a los que se vinieron al campo liberal.
Con motivo de la división entre carlistas y liberales se producían
riñas constantes; un día hubo en el segundo patio una gran pelea
entre un bandido que llamaban el Raspa, que había sido procesado a
raíz de la matanza de frailes, y un guerrillero carlista, el Ausell.
Se desafiaron: el Raspa le tiró una navajada y le cortó la cara,
mientras el otro le dió una cuchillada en el pecho que le dejó medio
muerto.
Yo hice un padrón de los presos liberales, de los carlistas y de los
indefinidos, y como prefacio al padrón, un ligero estudio acerca de la
psicología de los tipos desde el punto de vista del mayor o menor
valor que podían tener para una conspiración.
Aviraneta me confesó que en su tiempo pensó hacer, más o menos
en broma, el manual del perfecto conspirador.
VI.
EL SEGUNDO PATIO
En el patio de la cárcel
hay escrito con carbón:
«Aquí el bueno se hace
malo, y el malo se hace
peor».
Carcelera.
ebookball.com