Source: https://leetcode.com/problems/backspace-string-compare/

Given two strings `S`

and `T`

, return if they are equal when both are typed into empty text editors. `#`

means a backspace character.

Source: https://leetcode.com/problems/backspace-string-compare/

Given two strings `S`

and `T`

, return if they are equal when both are typed into empty text editors. `#`

means a backspace character.

Source: https://leetcode.com/problems/flatten-nested-list-iterator/

Given a nested list of integers, implement an iterator to flatten it.

Each element is either an integer, or a list — whose elements may also be integers or other lists.

Read MoreSource: https://leetcode.com/problems/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 queue.
- peek() — Get the front element.
- empty() — Return whether the queue is empty.

Source: https://leetcode.com/problems/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() — Get the top element.
- empty() — Return whether the stack is empty.

Source Url: https://leetcode-cn.com/problems/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.
- pop() — Removes the element on top of the stack.
- top() — Get the top element.
- getMin() — Retrieve the minimum element in the stack.

Source: https://leetcode.com/problems/simplify-path/

Given an **absolute path** for a file (Unix-style), simplify it. Or in other words, convert it to the **canonical path**.

In a UNIX-style file system, a period `.`

refers to the current directory. Furthermore, a double period `..`

moves the directory up a level. For more information, see: Absolute path vs relative path in Linux/Unix

Note that the returned canonical path must always begin with a slash `/`

, and there must be only a single slash `/`

between two directory names. The last directory name (if it exists) **must not** end with a trailing `/`

. Also, the canonical path must be the **shortest** string representing the absolute path.

Source URL: https://leetcode.com/problems/valid-parentheses/

Given a string containing just the characters `'('`

, `')'`

, `'{'`

, `'}'`

, `'['`

and `']'`

, determine if the input string is valid.

An input string is valid if:

- Open brackets must be closed by the same type of brackets.
- Open brackets must be closed in the correct order.

Note that an empty string is also considered valid.

Read More