allendowney / thinkdatastructures Goto Github PK
View Code? Open in Web Editor NEWLaTeX source and supporting code for Think Data Structures: Algorithms and Information Retrieval in Java
License: MIT License
LaTeX source and supporting code for Think Data Structures: Algorithms and Information Retrieval in Java
License: MIT License
Hi,
This may be a small thing, still it made me confused for sometime.
Section : Exercise 2
In the file MyArrayList.java, stubs are given for four methods as listed below.
However in the text book, it has asked to implement only three methods, skipping add method.
There is no specific instruction given in the book, what to do with the stub given for add method.
Obviously everyone can assume that this has also to be implemented, for that purpose the code is
also given in the book. Therefore it is a matter of copy and paste, I did so.
Still it confused a bit while reading the book. The similar point is applicable to the file MyLinkedList.java as well.
public boolean add(T element) {}
public int indexOf(Object target) {}
public T remove(int index) {}
public T set(int index, T element) {}
MyLinkedList.java
public void add(int index, E element) {}
public int indexOf(Object target) {}
public E remove(int index) {}
public List subList(int fromIndex, int toIndex) {}
Franklin
Why not add the red-black tree in chapter 13 ?
I hope I can learn the latest knowledge from the author's book. After all the treeMap use this in JDK1.8
Hello!
Is it possible to transform the project build from Ant to Maven?
Hi! Thank you for your book and this repo!
Little question: do you want change build tool from Ant to Maven?
I think Ant is little bit legacy now.
If you like this idea, I can create MR with convert Project to use maven.
Thank you!
Running WikiNodeExample, nothing printed in the terminal.
I guess that maybe wiki page is changed. When I saw page's DOM's tree, there was another <p class='mw-empty-elt'>
element. (And there is no text.)
So I changed index
0 to 1. And I can see paragraph same the book.
// ...
Elements paras = content.select("p");
Element firstPara = paras.get(0); // if change 0 -> 1, can see same result with book.
//...
Also, I think can solve this problem through change wiki page. But I am not sure how to fix. I ever not contributed wiki page. :)
Exercise 1 in book states "In the directory named code, you should find these files and directories: " build.xml and lib.
However, these are located within the solutions folder, not the code folder.
In page 16 you have this code
public T get(int index) {
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
return array[index];
}
but in the following text you have
it checks whether the index is less than size,
You're contradicting yourself
In chapter 14, you suggest to create a new cloud server on redistogo. But in Aug 2022, it has shut down. Can you please suggest additional resources for that?
see pages 39 and 41 for examples (Chapter 4)
Let's split the subtitle like this:
Computer science and
Information Retrieval in Java
It's impossible to do exercise 2 and pass the test, since the test depends on the add method and that method is only gonna be implemented in exercise 3.
Example on page 16, first paragraph in section "Prerequisites"
The merge sort in Listsorter.java is already implemented. This should be a TODO
Figure 6.3, which is yuml.pdf, is missing.
Not sure why, especially since yuml1.pdf seems to work.
The WikiFetcher looks in the class path for a locally stored resources folder with the HTML page to be tested, which is not provided in the repository:
// read the file
InputStream stream = WikiFetcher.class.getClassLoader().getResourceAsStream(filename);
Document doc = Jsoup.parse(stream, "UTF-8", filename);
I get a "cannot resolve symbol" error when compiling MyArrayList.java which is fixed by changing the @param
Page 15:16
the add function in exercise 2 is already solved while the implemented one (in the text) was left as todo
java.lang.ClassNotFoundException: com.allendowney.javacs.ListClientExample
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.