LeetCode – Clone Graph
Given a reference of a node in a connected Connected_graph undirected graph, return a deep copy
Given a reference of a node in a connected Connected_graph undirected graph, return a deep copy
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, , /. Each operand may be an integer or another expression.…
Daily Temperatures
Given a string containing just the characters '', '', '{', '}', '' and '', determine if the input string is valid
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…
Given a positive integer _n_, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to _n_. Example 1: Input: _n_ = Output…
You have a lock in front of you with circular wheels. Each wheel has slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and…
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands…
Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In…
Given a linked list, rotate the list to the right by _k_ places, where _k_ is non-negative. Example 1: Example 2: Input: 0->1->2->NULL, k = Output: 2->0->1->…