ZigZag Conversion 描述 分析 代码 ZigZag Conversion 描述 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display t...
Implement Stack using Queues 描述 分析 代码 相关题目 Implement Stack using Queues 描述 Implement the following operations of a stack using queues. push(x) — Push element x onto sta...
Min Stack 描述 分析 代码 Min Stack 描述 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) — Push element x onto stack. po...
Reorder List 描述 分析 代码 Reorder List 描述 Given a singly linked list L:L0→L1→⋯→Ln−1→LnL: L0 \rightarrow L_1 \rightarrow \cdots \rightarrow L{n-1} \rightarrow Ln L : L 0 ...
Next Permutation 描述 分析 代码 相关题目 Next Permutation 描述 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. I...
Flatten Binary Tree to Linked List 描述 分析 递归版1 递归版2 Flatten Binary Tree to Linked List 描述 Given a binary tree, flatten it to a linked list in-place. For example, Given ...