Loading Company...
This is a verified interview question from Nk-securities-iitb. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Count of Nodes in Connected Components - NK Securities IITB" covers key patterns like Other.
"### Problem Given nodes array. Two nodes are connected if they have a GCD Greater than 1. Return a vector of size of node array where it's value at index i is the number of nodes in the component which has that ith node N~1e5"
Join thousands of developers practicing for Nk-securities-iitb.