题目描述：

LeetCode 335. Self Crossing

You are given an array x of `n` positive numbers. You start at point `(0,0)` and moves `x[0]` metres to the north, then `x[1]` metres to the west, `x[2]` metres to ...

题目描述：

LeetCode 334. Increasing Triplet Subsequence

Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.

Formally the function should:

Return true if there exists i, j, k
such that arr[i ...

题目描述：

LeetCode 332. Reconstruct Itinerary

Given a list of airline tickets represented by pairs of departure and arrival airports `[from, to]`, reconstruct the itinerary in order. All of the tickets belong to a man who departs from `JFK`. Thus, the ...

Java实现数组洗牌算法 作者是 在线疯狂 发布于 2016年2月3日 在 Java, 算法.

```按照下标从大到小的顺序遍历数组，记下标为i

Java代码：

``````public static void shuffle(int[] nums) {
Random rnd = new Random();
for (int i = nums.length - 1; i > 0; i--) {
int j ...``````

题目描述：

LeetCode 331. Verify Preorder Serialization of a Binary Tree

One way to serialize a binary tree is to use pre-oder traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we ...