摘要:
Design a data structure that supports all following operations in average O(1) time. Example: 阅读全文
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
摘要:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree [ 阅读全文
摘要:
题目1: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to 阅读全文