Every Jack has his Jill.

Every man can expect to have his partner.

Recently, I did some interesting array-related interview questions. The problem description starts like this or similar: *Given an array **nums** containing **n** numbers in the range **[0, n]** … *and asks you to find duplicate/missing numbers.

Here is one of the problem description

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.For example,Input:

[4,3,2,7,8,2,3,1]Output…

A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of value, together with a list of references to nodes (the “children”), with the constraints that no reference is duplicated, and none points to the root.

There are two types of trees that are frequently asked in the interview:

**Binary Tree**: a tree in which each node has up to two children**Binary Search Tree**: a binary tree in which every node fits a specific ordering property: all left descendants ≤ n < all…

I am currently reading the book “RESTful Web Service”, before this I have very limited knowledge about REST to the point that I even don’t know what do those four characters stand for. This article is a brief reading note from Chapter 1 to 4.

REST(Representational State Transfer) is a software architectural style that defines a set of constraints to be used for creating Web services.

REST is not an architecture, it’s a set of design criteria.

**Method Information & Scoping Information**

A client uses the *method information* to convey its intention to the server. One way to convey method…

Sliding window technique is useful for solving problems in array or string, especially it is considered as a technique that could reduce the time complexity from O(n²) to O(n).

**There are two types of sliding window:**

- Fixed window length k: the length of the window is fixed and it asks you to find something in the window such as the maximum sum of all windows, the maximum or median number of each window. …