Find Minimum in Rotated Sorted Array II

This is follow up to Find Minimum in Rotated Sorted Array. Suppose a sorted array is rotated at some pivot unknown to you beforehand, and duplicates are allowed. Find the minimum element.

Find Minimum in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand (i.e., [0, 1, 2, 4, 5, 6, 7] becomes [4, 5, 6, 7, 0, 1, 2]). Find the minimum element.

Heapify

Given an integer array, heapify it into a min-heap array. If there are multiple solutions, return any one.

Sort Integers II

Given an integer array, sort it in ascending order. Use quick sort, merge sort, heap sort or any O(nlogn) algorithm.

LRU Cache

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.

Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.

Reorder List

Given a singly linked list, L = {n1, n2, …, nn-1, nn}, reorder it so that L = {n1, nn, n2, nn-1, …}. Rearrange the nodes not just the values. Do it in place.

Linked List Cycle

Given a linked list, determine if it has a cycle in it.

Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.

Flatten Nested List Iterator

Given a nested list of integers, implement an iterator to flatten it.