Word Ladder

Given two words, start and end, and a dictionary, find the length of shortest transformation sequence from start to end. Each intermediate word must be in the dictionary and only one letter can be changed at a time. Return 0 if no such sequence.

Search for a Range

Given a sorted array of n integers, find the starting and ending position of a given target value.

Search a 2D Matrix II

Write an efficient algorithm that searches for a value in an m x n matrix, and return the number of occurrances of the target.

Reverse Linked List II

Reverse a linked list from position m to n, where 1 ≤ m ≤ n ≤ length of list.

Search 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 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no duplicate exists in the array.

N-Queens II

Follow up for N-Queens problem.

N-Queens

The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.

Binary Tree Zigzag Level Order Traversal

Given a binary tree, partition the value of the nodes by level in zigzag pattern: the first level should list values from left to right; the second level should list values from right to left, and etc.

Binary Tree Level Order Traversal II

Given a binary tree, partition the value of the nodes by level. Each level (partition) is represented as a list. Order the partitions from bottom up.

Binary Tree Level Order Traversal

Given a binary tree, partition the value of the nodes by level.