## HackerRank DAG Queries Problem Solution

In this post, we will solve HackerRank DAG Queries Problem Solution. You are given a Directed Acyclic Graph (DAG) with n vertices and m edges. Each vertex v has an integer, a,, associated with it and the initial value of a, is 0 for all vertices. You must perform q queries on the DAG, where…