LeetCode – Keys and Rooms

There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room.…

2020-01-14 · 2 分钟

LeetCode – Flood Fill

An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from to 65535). Given a coordinate (sr, sc) …

2019-11-03 · 2 分钟

LeetCode – Decode String

Given an encoded string, return its decoded string

2019-10-16 · 2 分钟

LeetCode – Implement Stack using Queues

Implement the following operations of a stack using queues. - push(x) -- Push element x onto stack. - pop() -- Removes the element on top of the stack. - top()…

2019-10-07 · 2 分钟

LeetCode – Implement Queue using Stacks

Implement the following operations of a queue using stacks. - push(x) -- Push element x to the back of queue. - pop() -- Removes the element from in front of…

2019-09-08 · 2 分钟

LeetCode – Binary Tree Inorder Traversal

Given a binary tree, return the _inorder_ traversal of its nodes\\' values. Example: Input: Output: Follow up: Recursive solution is trivial, could you do it…

2019-08-31 · 2 分钟

LeetCode – Target Sum

You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have symbols + and -. For each integer, you should choose one from + …

2019-08-20 · 2 分钟

LeetCode – Clone Graph

Given a reference of a node in a connected Connected_graph undirected graph, return a deep copy

2019-08-09 · 2 分钟

LeetCode – Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, , /. Each operand may be an integer or another expression.…

2019-08-04 · 2 分钟

LeetCode – Daily Temperatures

Daily Temperatures

2019-07-23 · 1 分钟