Homepage
Open in app
Sign in
Get started
DS Adventure
Distributed Store
Architecture
Leetcode Creative
Basic
Follow
Java 并发
这是一个总结性质的文章, 并且主要以Java内存模型为基础. 注意, 其中某些说法我使用了自己的理解, 我觉得这样理解更加有助于理想整个逻辑.
qqiangwu
Feb 24, 2017
Java IO
Java IO
IO是Java中的最重要的一个部分. 其中, java.io是所有编程者都应该掌握的IO方式. 在Java 1.4中, NIO被引入, 它引进了一种新的相对于流模型的新的IO模型, 以为非阻塞IO提供支持. 在Java 7中, NIO2又在NIO的基础上…
qqiangwu
Feb 23, 2017
STL Algorithms
The following the stl algorithms which can be used as building blocks of other algorithms.
qqiangwu
Feb 27, 2017
493. Reverse Pairs
If you have ever counted reverse numbers via merge sort, then you may feel that the solutions are probably similar.
qqiangwu
Mar 8, 2017
146. LRU Cache
Think about the requirements, both get and put need O(1), which inevitably involves hash operations and remind us that the basic data…
qqiangwu
Feb 23, 2017
624. Maximum Distance in Arrays
Make sure you understand the problem:
qqiangwu
Jun 18, 2017
572. Subtree of Another Tree
Enumerate all subtrees of tree s, and check whether the subtree is equal to t.
qqiangwu
Jun 20, 2017
563. Binary Tree Tilt
Simple recursion is okay.
qqiangwu
Jun 20, 2017
606. Construct String from Binary Tree
Simple recursion problem.
qqiangwu
Jun 20, 2017
599. Minimum Index Sum of Two Lists
We can simply enumerate all potential pairs, which costs O(mn).
qqiangwu
Jun 20, 2017
623. Add One Row to Tree
Just a procedural problem. Do it according to the definition.
qqiangwu
Jun 20, 2017
611. Valid Triangle Number
The obvious solution is to enumerate all possible solutions which costs O(n³). 1000³ = 10⁹ will produce a TLE. For faster lookup, we can…
qqiangwu
Jun 17, 2017
617. Merge Two Binary Trees
A tree problem.
qqiangwu
Jun 17, 2017
About DS Adventure
Latest Stories
Archive
About Medium
Terms
Privacy
Teams