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
Jan 6 · 4 min read · 트리나 그래프를 공부하다 보면 항상 함께 등장하는 개념이 있다. DFS / BFS Preorder / Inorder / Postorder 이 둘은 자주 묶여 설명되지만, 실제로는 역할과 레벨이 다르다.이번 글에서는 다음 질문들에 답하는 흐름으로 정리해본다. DFS는 왜 순회 방식이 3가지로 나뉘는가? 순회 코드는 같은데 visit 위치만 다른 건가? BFS에는 왜 preorder / postorder 같은 개념이 없는가? 실무에서...
Join discussionJan 6 · 7 min read · DFS Traversal — 4 Easy Rules Rule 1 — Start Put the starting vertex into a stack Keep an empty visited set stack.push(start); Set<Integer> visited = new HashSet<>(); Rule 2 — Take from Stack While the stack is not empty: Pop the top vertex fro...
Join discussionDec 8, 2025 · 2 min read · How to Buy Verified CashApp Accounts In today's digital age, where online transactions have become the norm, having a verified CashApp account is essential for seamless money transfers and financial transactions. But what do you do if you encounter d...
Join discussionNov 30, 2025 · 5 min read · Introduction Traditional file systems on a single machine just can't keep up with the scale and performance needs of modern data infrastructure. That’s where Distributed File Systems (DFS) come into play. In this blog, I’ll take you through what a DF...
Join discussionNov 7, 2025 · 5 min read · Introduction In this blog post, I’m highlighting three problems I’ve had the opportunity to work on. I found their solutions both endearing and instructive, especially for a wider audience such as Computer Science or Software Engineering students. Fe...
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 discussionSep 21, 2025 · 4 min read · Depth-first search (DFS) is an algorithm for traversing through graph or tree data structures. You can think of it as searching through different paths in a maze to find an exit and backtracking to the previous path if the current path leads to a dea...
Join discussion
Sep 7, 2025 · 4 min read · Problem You are given an adjacency list, adj of Undirected Graph having unit weight of the edges, find the shortest path from src to all the vertex and if it is unreachable to reach any vertex, then return -1 for that vertex. Examples : Input: adj[][...
Join discussion