721. Accounts Merge

Problem description:

Given a list accounts, each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account.

Readmore

13. Roman to Integer

Problem description:

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.

1
2
3
4
5
6
7
8
Symbol       Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000

Readmore

99. Recover Binary Search Tree

Problem description:

Two elements of a binary search tree (BST) are swapped by mistake.

Readmore

63. Unique Paths II

Problem description:

A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).

Readmore

In-place conversion of Sorted DLL to Balanced BST

Problem description:

Given a Doubly Linked List which has data members sorted in ascending order. Construct a Balanced Binary Search Tree which has same data members as the given Doubly Linked List. The tree must be constructed in-place (No new node should be allocated for tree conversion)

Readmore

42. Trapping Rain Water

Problem description:

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.

Readmore

158. Read N Characters Given Read4 II - Call multiple times

Problem description:

The API: int read4(char *buf) reads 4 characters at a time from a file.

Readmore

128. Longest Consecutive Sequence

Problem description:

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.

Readmore

161. One Edit Distance

Problem description:

Given two strings s and t, determine if they are both one edit distance apart.

Readmore

114. Flatten Binary Tree to Linked List

Problem description:

Given a binary tree, flatten it to a linked list in-place.

Readmore