Contiguous Intervals
You are given a list of unique integers nums. Return a sorted two dimensional list of integers where each list represents an inclusive interval summarizing i...
You are given a list of unique integers nums. Return a sorted two dimensional list of integers where each list represents an inclusive interval summarizing i...
You are given a two-dimensional integer matrix, where matrix[r][c] represents the height of a condominium in a city.
Implement a circular queue with the following methods:
You are given a two-dimensional integer matrix of 1s and 0s, where a 1 represents a bomb and 0 represents an empty cell. When a bomb explodes, all the spaces...
Implement a zip iterator of two lists of integers a and b where
Implement a data structure with the following methods:
You are given a singly linked list node and an integer k. Swap the value of the k-th (0-indexed) node from the end with the k-th node from the beginning.
Given a directed graph represented as an adjacency list, return its reverse so if an edge goes from A to B, it now goes from B to A.
Given a string of parentheses s, return the minimum number of parentheses to be removed to make the string balanced.
Given a lowercase alphabet string s, partition s into as many pieces as possible such that each letter appears in at most one piece and return the sizes of t...
Given a list of integers nums, and integers k and target, return the number of sublists whose length is k and its average value ≥ target.
Given a two-dimensional integer matrix of 1s and 0s, return the number of “islands” in the matrix. A 1 represents land and 0 represents water, so an island i...