Pergunta de entrevista da empresa Google

Design a class to process a matrix, and it needs to be able to return the average for the elements of arbitrary sub-rectangle inside that matrix, in constant time.

Respostas da entrevista

Sigiloso

28 de fev. de 2011

prefix sum

1

Sigiloso

10 de jun. de 2012

this is based on this http://en.wikipedia.org/wiki/Summed_area_table

1

Sigiloso

14 de set. de 2019

Preprocess each cells average count and later use this information to get average of any sub block in constant time