Jan 16 · 5 min read · Tarjan’s algorithm is used to find bridges in a graph. But under the hood, it’s a story of selfish parents and selfish children in a family tree where nobody dies. Imagine a family where ancestors give birth to their children and those children give ...
Join discussion
Oct 19, 2025 · 3 min read · Problem There are n servers numbered from 0 to n - 1 connected by undirected server-to-server connections forming a network where connections[i] = [a<sub>i</sub>, b<sub>i</sub>] represents a connection between servers a<sub>i</sub> and b<sub>i</sub>....
Join discussionOct 18, 2025 · 3 min read · Problem Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account. Now, we would like to merge these acco...
Join discussionOct 12, 2025 · 2 min read · Introduction A disjoint set is a data structure that helps determine if two nodes are part of the same component efficiently. While BFS or DFS can be used to check this, a disjoint set can perform the task in constant time. It is particularly useful ...
Join discussionOct 12, 2025 · 3 min read · Problem Given a weighted, undirected, and connected graph with V vertices and E edges, the task is to find the sum of the weights of the edges in the Minimum Spanning Tree (MST) of the graph using Kruskal's Algorithm. The graph is represented as an e...
Join discussionSep 30, 2025 · 3 min read · Introduction I understand your confusion. We were supposed to talk about graphs, and here I am, talking about rock climbing and climbing routes instead. I am a climber. Be it indoors or outdoors, be it rocks or mountains — doesn’t matter too much. Bu...
JJeremi commented
Sep 21, 2025 · 3 min read · Spanning Tree A tree in which we have N nodes and N-1 edges and all nodes are reachable from each other. Some of the possible Spannig trees Minimum Spanning Tree A spanning tree where the total sum of all the edges is the smallest possible is call...
Join discussionSep 16, 2025 · 3 min read · Let’s play a game. Your task is to draw a house by connecting the dots without lifting your pen (or pencil, or mouse). You can visit a dot multiple times, but you are allowed to draw an edge only once! Depending on which dot you choose as your start...
JJeremi commented
Sep 16, 2025 · 2 min read · This blog explores how we see and understand structure — especially the structure of the world around us. It begins with data collected from sensors like cameras, LIDAR, and positioning and motion sensors, then modeled as graphs, revealing how things...
Join discussion