Coder Social home page Coder Social logo

allendowney / thinkdatastructures Goto Github PK

View Code? Open in Web Editor NEW
520.0 27.0 1.3K 6.61 MB

LaTeX source and supporting code for Think Data Structures: Algorithms and Information Retrieval in Java

License: MIT License

Makefile 0.25% TeX 52.14% Java 46.13% HTML 1.48%

thinkdatastructures's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thinkdatastructures's Issues

Exercise 2 - may be a lack of documentation - add method

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

Suggest: add the red-black tree

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

From Ant -> Maven

Hello!
Is it possible to transform the project build from Ant to Maven?

Move 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!

firstPara is empty in Wiki page(Java).

Issue

Running WikiNodeExample, nothing printed in the terminal.

Cause

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.)

image

Solved

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. :)

Errata

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.

Get Method code doesnt match the text

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

Redistogo has shut down

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?

Running tests from Exercise Chapter 8 - Indexer not possible

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);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.