NeetCode #598LC-2101MediumGraphs
← Back to All Problems

#598 · #2101 · Detonate the Maximum Bombs(引爆最多的炸弹)

📌 Problem Statement & Constraints

Given an m x n grid of characters, return whether there is a cycle of length 4 or more: four or more cells of the same value connected 4-directionally in a loop. Constraints: 1 <= m, n <= 500, grid[i][j] is a lowercase letter.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!