Search⌘ K
AI Features

Exercise: Toxic Gas Leak Detection

Explore how to apply Dart's flow control statements, including if conditions and nested loops, to scan sensor grids for toxic gas leaks. Learn to validate input, break loops early on critical leaks, and handle real-world data within Dart programs.

Problem statement

An industrial facility utilizes a grid of sensors to monitor gas levels across different facility sectors. The data arrives as a list of lists, where each inner list represents a sector's sensor readings. We must scan each sector, identify if a critical leak exists, and immediately stop scanning that specific sector once a leak is found ...