easy5 pts · first answer countsgraphsunion-findconnected-components
Counting groups after several unions
Six customers 1 to 6 start in their own groups. You run union(1,2), union(3,4), union(2,1), union(5,6), union(4,5). How many groups remain?
Discussion 0
Join free to post in the discussion.
Related questions
- Edges in a tree with n nodesBackend Developer
- Most nodes in a binary tree of height 3Backend Developer
- What inorder traversal of a BST givesBackend Developer
- Preorder output of a small treeBackend Developer
- Traversal for freeing a whole treeBackend Developer
- Data structure for level-order traversalBackend Developer
- BST search time, typical and worstBackend Developer
- Leaves in a full binary treeBackend Developer