Sparse Arrays

Cerinta completa There is a collection of input strings and a collection of query strings. For each query string, determine how many times it occurs in the list of input strings. Return an array of the results. Example There are

Merging Communities

Cerinta completa People connect with each other in a social network. A connection between Person and Person is represented as . When two persons belonging to different communities connect, the net effect is the merge the communities which and belong

Lazy White Falcon

Cerinta completa White Falcon just solved the data structure problem below using heavy-light decomposition. Can you help her find a new solution that doesn’t require implementing any fancy techniques? There are types of query operations that can be performed on

Max Transform

Cerinta completa Transforming data into some other data is typical of a programming job. This problem is about a particular kind of transformation which we’ll call the max transform. Let be a zero-indexed array of integers. For , let denote

Largest Rectangle

Cerinta completa Skyline Real Estate Developers is planning to demolish a number of old, unoccupied buildings and construct a shopping mall in their place. Your task is to find the largest solid area in which the mall can be constructed.