Java notes

Notes when learning Java.
Collecting useful data structure conception and tips in Java developing.

Data structure

Array

  1. Arrays.asList
    https://blog.csdn.net/kzadmxz/article/details/80394351

HashSet

https://www.runoob.com/java/java-hashset.html
only ' is allowed when declare character, " is invalid but for strings.

leetcode

dual pointers

  1. 有序数组计算和
  2. 字符串翻转/回文
  3. 有序数组归并
  4. 链表环追击
  5. 最长match的字符串子序列

linked list

Coding tips

  1. compareTo
    • compare object, especially string, compare with ascii num, start from the first char of the string until get result.
    • compare num, can be any type of numeric num.