Given two words,
end, and a dictionary, find the length of shortest transformation sequence from
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.
Given a sorted array of n integers, find the starting and ending position of a given target value.
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 a linked list from position
n, where 1 ≤ m ≤ n ≤ length of list.
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.
Follow up for N-Queens problem.
The n-queens puzzle is the problem of placing
n queens on an
n×n chessboard such that no two queens attack each other.
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.
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.
Given a binary tree, partition the value of the nodes by level.