← Swiggy questions
CodingReported in a candidate post, Sep 2022

Surrounded regions

Filed under Swiggy · Also reported at GreyOrange

Given an m x n board containing 'X' and 'O', capture every region of 'O' cells that is fully surrounded by 'X' (4-directional adjacency) by flipping those 'O' to 'X'. An 'O' region touching the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.