Given a nested list of integers, implement an iterator to flatten it.
Given a list, rotate the list to the right by
k places, where
k is non-negative.
m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
k sorted linked lists and return it as one sorted list.
The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should double the size of the hash table and rehash every keys. Say you have a hash table looks like below:
Given two strings, return the length of the longest common substring.
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree.
Given a linked list and two values
v2. Swap the two nodes in the linked list with values
v2. It’s guaranteed there is no duplicate values in the linked list. If
v2 does not exist in the given linked list, do nothing.
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list.
A message containing letters from
Z is being encoded to numbers using the following mapping: