Domanda di colloquio di Meta

First problem was a string problem and second involved using segtree to calculate points in a matrix.