Tag: c++
You are given a list of integers nums. Consider an operation where we select some subset of integers in the list and increment all of them by one. Return …
Given a two-dimensional integer matrix, return a new matrix A of the same dimensions where each element is set to A = sum(matrix) for all r ≤ i, c …
You are given a two-dimensional list of integers intervals and an integer point. Each element contains represents an inclusive interval. Return the number of intervals that are intersecting at …
Implement FreqStack, a class which simulates the operation of a stack-like data structure. FreqStack has two functions: push(int x), which pushes an integer x onto the stack. pop(), which …
Implement a data structure LastValueMap which has the following methods: void set(int key, int value) which associates key with value. void remove(int key) which removes key and its associated …