Search⌘ K
AI Features

Solution: Paths in Maze That Lead to Same Room

Solution: Paths in Maze That Lead to Same Room gives an undirected maze as corridors between numbered rooms. Return the number of distinct cycles that visit exactly three rooms.

Statement

A maze consists of nn rooms numbered from 1−n1 - n, and some rooms are connected by corridors. You are given a 2D integer array, corridors, where cor ...