Samsara interview question

One easy string and Three matrix problems