摘要:
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 阅读全文
摘要:
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
摘要:
Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
摘要:
Given two strings s and t, determine if they are both one edit distance apart. Note: There are 3 possiblities to satisify one edit distance apart: Exa 阅读全文
摘要:
Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: The flattened tree should look like: 题目 将左子树所形成的链表插入 阅读全文
摘要:
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique q 阅读全文
摘要:
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all mee 阅读全文
摘要:
Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
摘要:
Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. Example: Solution1: HashMap 阅读全文
摘要:
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 题目 如题 思路 1. while loop will run as long as 阅读全文