399. Evaluate Division

Problem description:

Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer does not exist, return -1.0.

1
2
3
4
Example:
Given a / b = 2.0, b / c = 3.0.
queries are: a / c = ?, b / a = ?, a / e = ?, a / a = ?, x / x = ? .
return [6.0, 0.5, -1.0, 1.0, -1.0 ].

Readmore

491. Increasing Subsequences

Problem description:

Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing subsequence should be at least 2 .

Readmore

636. Exclusive Time of Functions

Problem description:

Given the running logs of n functions that are executed in a nonpreemptive single threaded CPU, find the exclusive time of these functions.

Readmore

429. N-ary Tree Level Order Traversal

Problem description:

Given an n-ary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).

Readmore

251. Flatten 2D Vector

Problem description:

Implement an iterator to flatten a 2d vector.

Readmore

281. Zigzag Iterator

Problem description:

Given two 1d vectors, implement an iterator to return their elements alternately.

Readmore

825. Friends Of Appropriate Ages

Problem description:

Some people will make friend requests. The list of their ages is given and ages[i] is the age of the ith person.

Readmore

311. Sparse Matrix Multiplication

Problem description:

Given two sparse matrices A and B, return the result of AB.

Readmore

819. Most Common Word

Problem description:

Given a paragraph and a list of banned words, return the most frequent word that is not in the list of banned words. It is guaranteed there is at least one word that isn’t banned, and that the answer is unique.

Readmore

4. Median of Two Sorted Arrays

Problem description:

There are two sorted arrays nums1 and nums2 of size m and n respectively.

Readmore