A node is not considered an ancestor of itselfReturn an array ans of size n where ansi is the closest ancestor to node i such that numsi and numsansi are coprime or 1 if there is n

Showing the single result

Showing the single result