摘要:
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The a 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta 阅读全文
摘要:
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each inp 阅读全文
摘要:
Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early years. When a boy A had a crush on a g 阅读全文
摘要:
Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are 阅读全文
摘要:
Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each 阅读全文
摘要:
When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A socia 阅读全文
摘要:
According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
摘要:
Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g 阅读全文
摘要:
According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
摘要:
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gainin 阅读全文
摘要:
The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. 阅读全文
摘要:
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n 阅读全文
摘要:
A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as po 阅读全文
摘要:
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any 阅读全文
摘要:
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s 阅读全文
摘要:
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c 阅读全文