← ALL NOTES
Array

3643. Flip Square Submatrix Vertically

Given a matrix grid and a position (x,y) — the top-left corner of a k×k square. Vertically flip (reverse the rows of) that k×k submatrix in place and return grid.

Loading…