{"id":27296,"date":"2024-10-27T14:10:18","date_gmt":"2024-10-27T14:10:18","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=27296"},"modified":"2024-11-26T07:19:51","modified_gmt":"2024-11-26T07:19:51","slug":"c-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ea%b9%8a%ec%9d%b4-%ec%9a%b0%ec%84%a0-%ed%83%90%ec%83%89","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/27296\/","title":{"rendered":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9"},"content":{"rendered":"<div class=\"post\">\n<p>\uc548\ub155\ud558\uc138\uc694, \uc5ec\ub7ec\ubd84! \uc624\ub298\uc740 C#\uc744 \uc774\uc6a9\ud55c \ucf54\ub529\ud14c\uc2a4\ud2b8 \uc900\ube44\ub97c \uc704\ud55c \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS) \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc740 \ud2b8\ub9ac\ub098 \uadf8\ub798\ud504 \uad6c\uc870\ub97c \ud0d0\uc0c9\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \ud6a8\uc728\uc801\uc778 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 DFS\uc758 \uae30\ubcf8 \uac1c\ub150, \uad6c\ud604 \ubc29\ubc95, \uc2e4\uc81c \ubb38\uc81c\ub97c \ud1b5\ud574 \uc774\ub97c \uc5b4\ub5bb\uac8c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0\uc5d0 \ub300\ud574 \ub2e8\uacc4\ubcc4\ub85c \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS)\ub780?<\/h2>\n<p>\uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS, Depth-First Search)\uc740 \uadf8\ub798\ud504\uc758 \ubaa8\ub4e0 \ub178\ub4dc\ub97c \ubc29\ubb38\ud558\ub294 \ud0d0\uc0c9 \uae30\ubc95\uc785\ub2c8\ub2e4. \uc774 \uc54c\uace0\ub9ac\uc998\uc740 \ud55c \ub178\ub4dc\uc5d0\uc11c \uac00\ub2a5\ud55c \uae4a\uac8c \ud0d0\uc0c9\ud55c \ud6c4, \ub354 \uc774\uc0c1 \ub098\uc544\uac08 \uc218 \uc5c6\uc744 \ub54c \uac00\uc7a5 \ub9c8\uc9c0\ub9c9\uc5d0 \ubc29\ubb38\ud588\ub358 \ub178\ub4dc\ub85c \ub3cc\uc544\uac00 \ub2e4\ub978 \uacbd\ub85c\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4.<\/p>\n<h3>1.1 \uae30\ubcf8 \uc6d0\ub9ac<\/h3>\n<p>DFS\ub294 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud574 \uad6c\ud604\ud560 \uc218 \uc788\uc73c\uba70, \uc7ac\uadc0 \ud568\uc218\ub97c \uc774\uc6a9\ud574 \uac04\ud3b8\ud558\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. DFS\uc758 \uae30\ubcf8\uc801\uc778 \uc6d0\ub9ac\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\uc2dc\uc791 \ub178\ub4dc\ub97c \uc120\ud0dd\ud569\ub2c8\ub2e4.<\/li>\n<li>\ubc29\ubb38\ud55c \ub178\ub4dc\ub97c \uae30\ub85d\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc778\uc811\ud55c \ub178\ub4dc \uc911 \ubc29\ubb38\ud558\uc9c0 \uc54a\uc740 \ub178\ub4dc\ub97c \uc120\ud0dd\ud558\uc5ec \uc7ac\uadc0\uc801\uc73c\ub85c DFS\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n<li>\ub354 \ubc29\ubb38\ud560 \ub178\ub4dc\uac00 \uc5c6\uc73c\uba74 \uc774\uc804 \ub178\ub4dc\ub85c \ub3cc\uc544\uac11\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>2. DFS\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4<\/h2>\n<p>DFS\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 O(V + E)\uc785\ub2c8\ub2e4. \uc5ec\uae30\uc11c V\ub294 \uc815\uc810(\ub178\ub4dc)\uc758 \uc218, E\ub294 \uac04\uc120\uc758 \uc218\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4. \uc774\ub294 \uadf8\ub798\ud504\uc758 \ubaa8\ub4e0 \ub178\ub4dc\ub97c \ud55c \ubc88\uc529 \ubc29\ubb38\ud558\uace0, \ubaa8\ub4e0 \uac04\uc120\ub3c4 \ud55c \ubc88\uc529 \ud655\uc778\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \uacf5\uac04 \ubcf5\uc7a1\ub3c4\ub294 \uc0ac\uc6a9\ub418\ub294 \uc2a4\ud0dd\uc5d0 \ub530\ub77c \ub2e4\ub974\uba70, \ucd5c\uc545\uc758 \uacbd\uc6b0 O(V)\uc785\ub2c8\ub2e4.<\/p>\n<h2>3. DFS \uad6c\ud604\ud558\uae30<\/h2>\n<p>\uc774\uc81c C#\uc73c\ub85c DFS\ub97c \uad6c\ud604\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \uadf8\ub798\ud504\ub97c \uc778\uc811 \ub9ac\uc2a4\ud2b8 \ud615\uc2dd\uc73c\ub85c \ud45c\ud604\ud558\uace0 DFS\ub97c \uad6c\ud604\ud55c \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>\nusing System;\nusing System.Collections.Generic;\n\nclass Graph\n{\n    private int V; \/\/ \uc815\uc810\uc758 \uc218\n    private List<int>[] adj; \/\/ \uc778\uc811 \ub9ac\uc2a4\ud2b8\n\n    public Graph(int v)\n    {\n        V = v;\n        adj = new List<int>[V];\n        for (int i = 0; i &lt; V; i++)\n        {\n            adj[i] = new List<int>();\n        }\n    }\n\n    public void AddEdge(int v, int w)\n    {\n        adj[v].Add(w); \/\/ \ub178\ub4dc v\uc5d0 \ub178\ub4dc w\ub97c \ucd94\uac00\n    }\n\n    public void DFS(int v)\n    {\n        bool[] visited = new bool[V]; \/\/ \ubc29\ubb38 \uc5ec\ubd80 \ubc30\uc5f4\n        DFSUtil(v, visited); \/\/ \uc7ac\uadc0 \ud638\ucd9c\n    }\n\n    private void DFSUtil(int v, bool[] visited)\n    {\n        visited[v] = true; \/\/ \ud604\uc7ac \ub178\ub4dc \ubc29\ubb38\n        Console.Write(v + \" \"); \/\/ \ud604\uc7ac \ub178\ub4dc \ucd9c\ub825\n\n        foreach (int neighbor in adj[v])\n        {\n            if (!visited[neighbor]) \/\/ \uc778\uc811\ud55c \ub178\ub4dc\uac00 \ubc29\ubb38\ub418\uc9c0 \uc54a\uc558\uc73c\uba74\n            {\n                DFSUtil(neighbor, visited); \/\/ \uc7ac\uadc0 \ud638\ucd9c\n            }\n        }\n    }\n}\n\nclass Program\n{\n    static void Main(string[] args)\n    {\n        Graph g = new Graph(4);\n        g.AddEdge(0, 1);\n        g.AddEdge(0, 2);\n        g.AddEdge(1, 2);\n        g.AddEdge(2, 0);\n        g.AddEdge(2, 3);\n        g.AddEdge(3, 3);\n\n        Console.WriteLine(\"Depth First Traversal (\uc2dc\uc791 \ub178\ub4dc 2):\");\n        g.DFS(2);\n    }\n}\n<\/int><\/int><\/int><\/code><\/pre>\n<h3>3.1 \ucf54\ub4dc \uc124\uba85<\/h3>\n<p>\uc704\uc758 \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>Graph \ud074\ub798\uc2a4:<\/strong> \uadf8\ub798\ud504\uc758 \uc815\uc810 \uc218\uc640 \uc778\uc811 \ub9ac\uc2a4\ud2b8\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>AddEdge \uba54\uc11c\ub4dc:<\/strong> \ub450 \ub178\ub4dc \uc0ac\uc774\uc758 \uac04\uc120\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>DFS \uba54\uc11c\ub4dc:<\/strong> DFS \ud0d0\uc0c9\uc744 \uc218\ud589\ud558\uae30 \uc704\ud574 \ubc29\ubb38 \uc5ec\ubd80 \ubc30\uc5f4\uc744 \ucd08\uae30\ud654\ud558\uace0, DFSUtil\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>DFSUtil \uba54\uc11c\ub4dc:<\/strong> \uc7ac\uadc0\uc801\uc73c\ub85c DFS\ub97c \uc218\ud589\ud558\uba70, \ubc29\ubb38\ud55c \ub178\ub4dc\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>4. \uc54c\uace0\ub9ac\uc998 \ubb38\uc81c: \uc12c\uc758 \uac1c\uc218 \uc138\uae30<\/h2>\n<p>\uc774\uc81c DFS\ub97c \ud65c\uc6a9\ud558\uc5ec \uc2e4\uc81c \ubb38\uc81c\ub97c \ud574\uacb0\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ubb38\uc81c\ub294 &#8216;\uc12c\uc758 \uac1c\uc218 \uc138\uae30&#8217;\uc785\ub2c8\ub2e4.<\/p>\n<h3>4.1 \ubb38\uc81c \uc124\uba85<\/h3>\n<p>\uc8fc\uc5b4\uc9c4 2\ucc28\uc6d0 \ubc30\uc5f4\uc740 \ubc14\ub2e4(0)\uc640 \uc721\uc9c0(1)\ub85c \uad6c\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc12c\uc740 \uc721\uc9c0(1)\uc758 \uc9d1\ud569\uc73c\ub85c, \uc11c\ub85c \uc5f0\uacb0\ub41c \uc721\uc9c0\ub4e4\ub85c \uad6c\uc131\ub429\ub2c8\ub2e4. \uc12c\uc774\ub780 \uc218\uc9c1 \ub610\ub294 \uc218\ud3c9\uc73c\ub85c \uc11c\ub85c \uc778\uc811\ud574 \uc788\ub294 \uc721\uc9c0\uc758 \uc9d1\ud569\uc785\ub2c8\ub2e4. \uc774 2\ucc28\uc6d0 \ubc30\uc5f4\uc5d0\uc11c \uc12c\uc758 \uac1c\uc218\ub97c \uc138\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc2dc\uc624.<\/p>\n<h3>4.2 \uc811\uadfc \ubc29\ubc95<\/h3>\n<p>\uc774 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \ub2e4\uc74c\uacfc \uac19\uc740 \ub2e8\uacc4\ub97c \uc218\ud589\ud558\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>2\ucc28\uc6d0 \ubc30\uc5f4\uc744 \uc21c\ud68c\ud558\uba70, \uc721\uc9c0(1)\ub97c \ubc1c\uacac\ud558\uba74 DFS\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4.<\/li>\n<li>DFS \ub0b4\uc5d0\uc11c \uc5f0\uacb0\ub41c \ubaa8\ub4e0 \uc721\uc9c0\ub97c \ubc29\ubb38\ud558\uba70 \uce74\uc6b4\ud2b8\ub97c \uc99d\uac00\uc2dc\ud0b5\ub2c8\ub2e4.<\/li>\n<li>\ubaa8\ub4e0 \uc721\uc9c0\ub97c \ub2e4 \ud0d0\uc0c9\ud55c \ud6c4 \uc12c\uc758 \uac1c\uc218\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>4.3 C# \ucf54\ub4dc \uad6c\ud604<\/h3>\n<pre><code>\nusing System;\n\nclass IslandCounter\n{\n    private int[,] grid;\n    private int rows, cols;\n\n    public IslandCounter(int[,] grid)\n    {\n        this.grid = grid;\n        rows = grid.GetLength(0);\n        cols = grid.GetLength(1);\n    }\n\n    public int CountIslands()\n    {\n        bool[,] visited = new bool[rows, cols];\n        int count = 0;\n\n        for (int i = 0; i &lt; rows; i++)\n        {\n            for (int j = 0; j &lt; cols; j++)\n            {\n                if (grid[i, j] == 1 &amp;&amp; !visited[i, j])\n                {\n                    DFS(i, j, visited); \/\/ DFS \ud638\ucd9c\n                    count++;\n                }\n            }\n        }\n        return count;\n    }\n\n    private void DFS(int i, int j, bool[,] visited)\n    {\n        if (i &gt;= rows || i &lt; 0 || j &gt;= cols || j &lt; 0 || grid[i, j] == 0 || visited[i, j])\n            return;\n\n        visited[i, j] = true; \/\/ \ubc29\ubb38 \ucc98\ub9ac\n\n        \/\/ \uc778\uc811\ud55c 8\uac1c \ubc29\ud5a5\uc73c\ub85c DFS \ud638\ucd9c\n        DFS(i + 1, j, visited);\n        DFS(i - 1, j, visited);\n        DFS(i, j + 1, visited);\n        DFS(i, j - 1, visited);\n        DFS(i + 1, j + 1, visited);\n        DFS(i - 1, j - 1, visited);\n        DFS(i + 1, j - 1, visited);\n        DFS(i - 1, j + 1, visited);\n    }\n}\n\nclass Program\n{\n    static void Main(string[] args)\n    {\n        int[,] grid = new int[,]\n        {\n            { 1, 1, 0, 0, 0 },\n            { 0, 1, 0, 0, 1 },\n            { 0, 0, 0, 1, 1 },\n            { 0, 0, 0, 0, 0 },\n            { 1, 0, 1, 0, 1 }\n        };\n\n        IslandCounter counter = new IslandCounter(grid);\n        Console.WriteLine(\"\uc12c\uc758 \uac1c\uc218: \" + counter.CountIslands());\n    }\n}\n<\/code><\/pre>\n<h3>4.4 \ucf54\ub4dc \uc124\uba85<\/h3>\n<p>\uc704\uc758 \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>IslandCounter \ud074\ub798\uc2a4:<\/strong> 2\ucc28\uc6d0 \ubc30\uc5f4\uc744 \uc778\uc790\ub85c \ubc1b\uc544 \uc12c\uc758 \uac1c\uc218\ub97c \uc138\ub294 \uae30\ub2a5\uc744 \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>CountIslands \uba54\uc11c\ub4dc:<\/strong> 2\ucc28\uc6d0 \ubc30\uc5f4\uc744 \ubc29\ubb38\ud558\uba70 \uc12c\uc758 \uac1c\uc218\ub97c \uce74\uc6b4\ud2b8\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>DFS \uba54\uc11c\ub4dc:<\/strong> \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc744 \ud1b5\ud574 \uc5f0\uacb0\ub41c \uc721\uc9c0(1)\ub97c \ubc29\ubb38 \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>5. \uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uae00\uc5d0\uc11c\ub294 \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS) \uc54c\uace0\ub9ac\uc998\uc758 \uae30\ubcf8 \uac1c\ub150\uacfc C#\uc744 \uc774\uc6a9\ud55c \uad6c\ud604 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \ub610\ud55c, DFS\ub97c \ud65c\uc6a9\ud55c &#8216;\uc12c\uc758 \uac1c\uc218 \uc138\uae30&#8217; \ubb38\uc81c\ub97c \ud1b5\ud574 \uc54c\uace0\ub9ac\uc998\uc744 \uc2e4\uc81c \ubb38\uc81c\uc5d0 \uc801\uc6a9\ud558\ub294 \ubc29\ubc95\uc744 \ubc30\uc6e0\uc2b5\ub2c8\ub2e4. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc740 \uadf8\ub798\ud504 \uc774\ub860\uc758 \uc911\uc694\ud55c \ubd80\ubd84\uc774\uba70, \ub2e4\uc591\ud55c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\ub294 \ub370 \uc720\uc6a9\ud55c \ub3c4\uad6c\uc785\ub2c8\ub2e4.<\/p>\n<p>\uacc4\uc18d\ud574\uc11c \ub2e4\uc591\ud55c \ubb38\uc81c\ub97c \ud480\uc5b4\ubcf4\uba70 \uc54c\uace0\ub9ac\uc998 \uc2e4\ub825\uc744 \ub2e4\uc838 \ub098\uac00\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4. \ub2e4\uc74c \uac15\uc88c\uc5d0\uc11c\ub294 \ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9(BFS)\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uac10\uc0ac\ud569\ub2c8\ub2e4!<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694, \uc5ec\ub7ec\ubd84! \uc624\ub298\uc740 C#\uc744 \uc774\uc6a9\ud55c \ucf54\ub529\ud14c\uc2a4\ud2b8 \uc900\ube44\ub97c \uc704\ud55c \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS) \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc740 \ud2b8\ub9ac\ub098 \uadf8\ub798\ud504 \uad6c\uc870\ub97c \ud0d0\uc0c9\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \ud6a8\uc728\uc801\uc778 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 DFS\uc758 \uae30\ubcf8 \uac1c\ub150, \uad6c\ud604 \ubc29\ubc95, \uc2e4\uc81c \ubb38\uc81c\ub97c \ud1b5\ud574 \uc774\ub97c \uc5b4\ub5bb\uac8c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0\uc5d0 \ub300\ud574 \ub2e8\uacc4\ubcc4\ub85c \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. 1. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS)\ub780? \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS, Depth-First Search)\uc740 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/27296\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[24],"tags":[],"class_list":["post-27296","post","type-post","status-publish","format-standard","hentry","category-c--"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/27296\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc548\ub155\ud558\uc138\uc694, \uc5ec\ub7ec\ubd84! \uc624\ub298\uc740 C#\uc744 \uc774\uc6a9\ud55c \ucf54\ub529\ud14c\uc2a4\ud2b8 \uc900\ube44\ub97c \uc704\ud55c \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS) \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc740 \ud2b8\ub9ac\ub098 \uadf8\ub798\ud504 \uad6c\uc870\ub97c \ud0d0\uc0c9\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \ud6a8\uc728\uc801\uc778 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 DFS\uc758 \uae30\ubcf8 \uac1c\ub150, \uad6c\ud604 \ubc29\ubc95, \uc2e4\uc81c \ubb38\uc81c\ub97c \ud1b5\ud574 \uc774\ub97c \uc5b4\ub5bb\uac8c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0\uc5d0 \ub300\ud574 \ub2e8\uacc4\ubcc4\ub85c \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. 1. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS)\ub780? \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS, Depth-First Search)\uc740 &hellip; \ub354 \ubcf4\uae30 &quot;C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/27296\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T14:10:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:19:51+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\",\"datePublished\":\"2024-10-27T14:10:18+00:00\",\"dateModified\":\"2024-11-26T07:19:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/\"},\"wordCount\":42,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/\",\"url\":\"https:\/\/atmokpo.com\/w\/27296\/\",\"name\":\"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T14:10:18+00:00\",\"dateModified\":\"2024-11-26T07:19:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/27296\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/27296\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/27296\/","og_locale":"ko_KR","og_type":"article","og_title":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc548\ub155\ud558\uc138\uc694, \uc5ec\ub7ec\ubd84! \uc624\ub298\uc740 C#\uc744 \uc774\uc6a9\ud55c \ucf54\ub529\ud14c\uc2a4\ud2b8 \uc900\ube44\ub97c \uc704\ud55c \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS) \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\uc740 \ud2b8\ub9ac\ub098 \uadf8\ub798\ud504 \uad6c\uc870\ub97c \ud0d0\uc0c9\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \ud6a8\uc728\uc801\uc778 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 DFS\uc758 \uae30\ubcf8 \uac1c\ub150, \uad6c\ud604 \ubc29\ubc95, \uc2e4\uc81c \ubb38\uc81c\ub97c \ud1b5\ud574 \uc774\ub97c \uc5b4\ub5bb\uac8c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0\uc5d0 \ub300\ud574 \ub2e8\uacc4\ubcc4\ub85c \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. 1. \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS)\ub780? \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9(DFS, Depth-First Search)\uc740 &hellip; \ub354 \ubcf4\uae30 \"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9\"","og_url":"https:\/\/atmokpo.com\/w\/27296\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T14:10:18+00:00","article_modified_time":"2024-11-26T07:19:51+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/27296\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/27296\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9","datePublished":"2024-10-27T14:10:18+00:00","dateModified":"2024-11-26T07:19:51+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/27296\/"},"wordCount":42,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/27296\/","url":"https:\/\/atmokpo.com\/w\/27296\/","name":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T14:10:18+00:00","dateModified":"2024-11-26T07:19:51+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/27296\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/27296\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/27296\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"C# \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=27296"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27296\/revisions"}],"predecessor-version":[{"id":27297,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27296\/revisions\/27297"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=27296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=27296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=27296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}