Reverse Linked List

Problem Description

Swap Nodes in Pairs

Problem Description

Merge k Sorted Lists

Problem Description

Merge Two Sorted Lists

Problem Description

Remove Nth Node From End of List

Problem Description

Add Two Numbers

Problem Description

leetcode

Talk is cheap show me the code.

Linux vmstat command examples

vmstat is used to report virtual memory statistics. We generally use it like this.

MySQL 8.0 enable remote access

Follow this article to download and install mysql. In this page I will show you how to enable remote access.

Linux netstat example

netstat command is used to see the network connections.

Java8 understand stream filter

I knew a long time ago that there is a method filter in stream. Every time I use it, I don’t know how it filters internally. Will he remove the qualified ones or leave the qualified ones? Every time I need to run the code to make sure my logic is correct.

Java ReentrantLock tryLock example

RentrantLock is more flexible than synchronized. When using synchronized, the thread will be blocked if the lock cannot be obtained. If RentrantLock is used, the above problem will not occur. We can use the tryLock method to try to obtain the lock and process our own business logic by obtaining the result.

guava implement round robin

we can use Iterators.cycle of guava to implement round robin. Here is an example.

Linux systemctl list all services

Use follow command to list all services in CentOS7.

Linux wget output to stdout

Use the following command to output the result of the wget command to the screen instead of saving it to a file.