Showing 3 questions
Determine the number of disconnected groups (connected components) within a given undirected graph. You're provided the graph's edges and need to find how many separate, reachable islands of nodes exist.
#1. Number of Connected Components in an Undirected Graph
Design a data structure that efficiently stores a set of strings and allows for prefix-based searches. Implement methods to insert strings, search for complete words, and check if any word starts with a given prefix.
#2. Implement Trie (Prefix Tree)
Find the minimum sum of a path from the top-left to the bottom-right corner of a grid. You can only move down or right at each step.
#3. Minimum Path Sum