Zomato, Recently Asked On-Campus Assessments in 25 Nov, 2025 | Valid Task Dependencies | Count Good Arrays

Zomato · Question · Posted Apr 2026

Question 1: Valid Task Dependencies Problem Statement: You are given a scheduling system with n tasks, each with specific dependencies. The rules for valid task dependencies are: Each task must depend on exactly one other task. No task can depend on itself directly or indirectly, except for the final task. All tasks should form a dependency chain leading to the final task. Given an array taskDependency where taskDependency[i] represents the task that task i depends on, calculate the minimum number ...

The full answer & interview discussion are available to premium members.

Log in Create a free account