Check if target word exists in matrix horizontally or vertically

easy
Last edited: August 2, 2025