there total numcourse course label 0 numcourses 1 you give array prerequisite prerequisitesi ai bi indicate course ai want course biFor example pair 0 1 indicate course 0 course 1prerequisite indirect if course prerequisite course b course b prerequisite course c course prerequisite course cyou give array query queriesj uj vj for jth query answer course uj prerequisite course vj notReturn boolean array answer answerj answer jth query Example 1input numcourses 2 prerequisite 10 query 0110output falsetrueexplanation the pair 1 0 indicate course 1 course 0course 0 prerequisite course 1 opposite trueExample 2input numcourses 2 prerequisite query 1001output falsefalseexplanation there prerequisite course independentexample 3input numcourses 3 prerequisite 121020 query 1012output truetrue Constraints2 numcourses 1000 prerequisiteslength numcourses numcourses 1 2prerequisitesilength 20 ai bi n 1ai biall pair ai bi uniquethe prerequisites graph cycles1 querieslength 1040 ui vi n 1ui vi