From dc3f915ce39e032b323a1e27e9da228c0e00d086 Mon Sep 17 00:00:00 2001
From: Shreyash <62343225+SniperBuddy101@users.noreply.github.com>
Date: Thu, 30 Jan 2025 09:01:27 +0530
Subject: [PATCH] Update graph.md

---
 apps/website/contents/algorithms/graph.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/website/contents/algorithms/graph.md b/apps/website/contents/algorithms/graph.md
index 5da3ec59..1fc214bb 100644
--- a/apps/website/contents/algorithms/graph.md
+++ b/apps/website/contents/algorithms/graph.md
@@ -180,7 +180,7 @@ def graph_topo_sort(num_nodes, edges):
         if nodes[node_id]['in'] == 0:
             queue.append(node_id)
     while len(queue):
-        node_id = queue.pop()
+        node_id = queue.popleft()
         for outgoing_id in nodes[node_id]['out']:
             nodes[outgoing_id]['in'] -= 1
             if nodes[outgoing_id]['in'] == 0: