Giter Site home page Giter Site logo

sssvip / algorithms4th Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 82 KB

Follow the "algorithms 4th" to read and code. 一步一步跟着《算法》第四版学习和编码,提高传统数据结构和算法的思维和实现能力。

Java 100.00%
algorithms-4th persistence self-study

algorithms4th's Introduction

Hi 👋, I'm David!

Top Langs

  • 🎯 I'm coding for a better world.
  • 💡 I'm an open source fancier.

algorithms4th's People

Stargazers

 avatar

Watchers

 avatar  avatar

algorithms4th's Issues

print out by array will output the null value

MiniArrayList miniArrayList = new MiniArrayList();
int dataSize = 5;
for (int i = 0; i < dataSize; i++) {
miniArrayList.add("test" + i);
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i < dataSize; i++) {
arrayList.add("test" + i);
}

System.out.println(Arrays.toString(miniArrayList.toArray()));//[test0, test1, test2, test3, test4, null, null, null, null, null]
System.out.println(Arrays.toString(arrayList.toArray()));//[test0, test1, test2, test3, test4]

print out direct just the memory address not the data

System.out.println(MiniArrayList's instance) will output the memory address not similar to ArrayList just output the data.

e.g.

MiniArrayList miniArrayList = new MiniArrayList();

System.out.println(miniArrayList); //fundamentals.list.MiniArrayList@1376c05c

ArrayList arrayList = new ArrayList();
System.out.println(arrayList);//[] (data)

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.