Quick Overview

Detect whether a negative-weight cycle is reachable from a specified vertex in a directed graph. Apply bounded edge-relaxation rounds without performing arithmetic on unreachable distances, and explain complexity, disconnected cycles, self-loops, parallel edges, and witness recovery.

Detect a Reachable Negative Cycle

Company: Hive.Ai

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

Overview: Detect whether a negative-weight cycle is reachable from a specified vertex in a directed graph. Apply bounded edge-relaxation rounds without performing arithmetic on unreachable distances, and explain complexity, disconnected cycles, self-loops, parallel edges, and witness recovery.

Loading…