Now&Here
Java---Generics

Java Generics——泛型

泛型,是一种方法,更是一种思想,它的目的在于“泛化”的表达,通过它可以创建出通用性更好的代码,能够用于更多的类型,并提供相应的类型安全保障,尽管与潜在类型机制还有一定的差距。

Java---类型信息

Java——类型信息

0 什么是类型信息?什么是RTTI?

类型信息,即每一个对象或者数据的类型所包含的信息。比如字符串类String以及自己创建的某个类的类型。

Java---Array

Java Array——数组

1 数组的特点

作为Java中持有对象的众多方式之一,数组可以说是“年岁已高”,但仍旧是长盛不衰,不论是在基础程序里,还是在算法设计里,都是一个出现频率很高且重点的知识内容。

正则表达式

Regular Expressions

1 字符

B 指定字符B(没有反斜杠) \n 换行
\xhh 十六进制值为 oxhh 的字符 \r 回车
\uhhh 十六进制为 oxhhh 的Unicode字符 \f 换页
\e 转义(ESC) \t 制表符

2 字符类

常用的字符类形式:

Java---String

Java String——字符串

1 String对象是不可变的(常量)

String对象具有只读特性,可以给一个String对象添加任意多的别名(也即引用),引用不能改变String对象本身的值。

leetcode86 Partition List

leetcode#86 Partition List

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.

leetcode189 Rotate Array

leetcode#189 Rotate Array

Rotate an array of n elements to the right by k steps.

leetcode61 Rotate List

leetcode#61 Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.

leetcode23 Merge K Sorted Lists

leetcode#23 Merge K Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

leetcode21 Merge Two Sorted Lists

leetcode#21 Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.