Category: c / c++
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 …
Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is greater …