LeetCode Insertion Sort List Sort a linked list using insertion... Read More

# Monthly Archives: February 2017

# LeetCode Construct Binary Tree from Inorder and Postorder Traversal

LeetCode Construct Binary Tree from Inorder and Postorder Traversal Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the... Read More

# LeetCode Construct Binary Tree from Preorder and Inorder Traversal

LeetCode Construct Binary Tree from Preorder and Inorder Traversal Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the... Read More

# LeetCode Binary Tree Zigzag Level Order Traversal

LeetCode Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between). For example: Given binary tree... Read More

# LeetCode Intersection of Two Linked Lists

LeetCode Intersection of Two Linked Lists Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘ c1... Read More

# LeetCode Word Ladder

LeetCode Word Ladder Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be changed at a time. Each transformed word must... Read More

# LeetCode Word Search

LeetCode Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell... Read More

# LeetCode Insert Interval

LeetCode Insert Interval Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Given intervals ,,... Read More

# LeetCode Merge Intervals

LeetCode Merge Intervals Given a collection of intervals, merge all overlapping intervals. For example, Given ,,,, return... Read More

# LeetCode Jump Game II

LeetCode Jump Game II Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the... Read More