public class BlackFilter extends java.lang.Object
For additional documentation see Section 3.5 (p.491) and Exercises 3.5.31 and 5.2.24 in Algorithms, 4th Edition, by Robert Sedgewick and Kevin Wayne.
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Sample run:
|
public static void main(java.lang.String[] args)
% more tinyTale.txt
it was the best of times it was the worst of times
it was the age of wisdom it was the age of foolishness
it was the epoch of belief it was the epoch of incredulity
it was the season of light it was the season of darkness
it was the spring of hope it was the winter of despair
% more list.txt
was it the of
% java BlackFilter list.txt < tinyTale.txt
best times worst times
age wisdom age foolishness
epoch belief epoch incredulity
season light season darkness
spring hope winter despair