Search
⌘K

Leetcode 3311. Construct 2D Grid Matching Graph Layout

Given an undirected graph that is guaranteed to be isomorphic to a 2D grid, reconstruct a 2D arrangement placing each node exactly once so that two nodes are adjacent in the grid iff there is an edge between them. Return any valid grid layout.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.