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

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:

  1. 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. …

Zengrui Wang

Senior Software Engineer @Hulu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store