TrueFoundry interview question

Lexicographic ordering and Matrix prefix Dsa