{"id":28096,"date":"2024-10-27T15:31:42","date_gmt":"2024-10-27T15:31:42","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=28096"},"modified":"2024-11-26T07:09:38","modified_gmt":"2024-11-26T07:09:38","slug":"%ec%8a%a4%ec%9c%84%ed%94%84%ed%8a%b8-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-dfs%ec%99%80-bfs-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%a8","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/28096\/","title":{"rendered":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8"},"content":{"rendered":"<p><body><\/p>\n<p>\ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ub4f1\uc7a5\ud558\ub294 \uc54c\uace0\ub9ac\uc998 \uc911 DFS(Depth-First Search)\uc640 BFS(Breadth-First Search)\ub294 \uadf8\ub798\ud504 \ubc0f \ud2b8\ub9ac \ud0d0\uc0c9\uc744 \uc704\ud55c \uae30\ubcf8\uc801\uc778 \ubc29\ubc95\ub860\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 \uc774 \ub450 \uac00\uc9c0 \uc54c\uace0\ub9ac\uc998\uc744 \uc2a4\uc704\ud504\ud2b8\ub85c \uad6c\ud604\ud558\uace0, \uc774\ub97c \ud65c\uc6a9\ud55c \ubb38\uc81c \ud480\uc774\ub97c \uc9c4\ud589\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. DFS\uc640 BFS \uac1c\uc694<\/h2>\n<p>DFS(Depth-First Search)\ub294 \ud55c \uacbd\ub85c\ub97c \ub05d\uae4c\uc9c0 \ud0d0\uc0c9\ud55c \ud6c4, \ub2e4\uc74c \uacbd\ub85c\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud558\uba70, \uc7ac\uadc0\uc801\uc73c\ub85c \ud638\ucd9c\ud558\uae30\ub3c4 \ud569\ub2c8\ub2e4.<\/p>\n<p>BFS(Breadth-First Search)\ub294 \uc2dc\uc791 \ub178\ub4dc\uc5d0\uc11c \uc778\uc811\ud55c \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud55c \ub4a4, \ub2e4\uc74c \uae4a\uc774\uc758 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc8fc\ub85c \ud050\ub97c \uc0ac\uc6a9\ud558\uc5ec \uad6c\ud604\ud569\ub2c8\ub2e4.<\/p>\n<h2>2. \ubb38\uc81c: \uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218 \uad6c\ud558\uae30<\/h2>\n<p>\uc8fc\uc5b4\uc9c4 \ubb34\ubc29\ud5a5 \uadf8\ub798\ud504\uc5d0\uc11c \uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218\ub97c \uad6c\ud558\ub294 \ubb38\uc81c\ub97c \ub2e4\ub904\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uadf8\ub798\ud504\ub294 \uc815\uc810\uacfc \uac04\uc120\uc73c\ub85c \uc774\ub8e8\uc5b4\uc838 \uc788\uc73c\uba70, \uc5f0\uacb0\ub41c \uc815\uc810\uc758 \uac1c\uc218\ub97c \ucc3e\ub294 \uac83\uc774 \ubaa9\ud45c\uc785\ub2c8\ub2e4.<\/p>\n<h3>\ubb38\uc81c \uc815\uc758<\/h3>\n<pre><code>\uc815\uc218 n (1 \u2264 n \u2264 1000): \uc815\uc810\uc758 \uac1c\uc218\n\ub9ac\uc2a4\ud2b8 edges: \uac01 \uac04\uc120\uc774 \uc5f0\uacb0\ud558\ub294 \ub450 \uc815\uc810\uc744 \ub098\ud0c0\ub0b4\ub294 (a, b)\uc758 \ud29c\ud50c\uc785\ub2c8\ub2e4.\n\n\uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218\ub97c \ubc18\ud658\ud558\uc138\uc694.\n<\/code><\/pre>\n<h3>\uc785\ub825 \uc608\uc2dc<\/h3>\n<pre><code>n = 5\nedges = [(1, 2), (2, 3), (4, 5)]\n<\/code><\/pre>\n<h3>\ucd9c\ub825 \uc608\uc2dc<\/h3>\n<pre><code>2\n<\/code><\/pre>\n<h2>3. \uc54c\uace0\ub9ac\uc998 \uc124\uba85<\/h2>\n<p>\uc774 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 DFS\uc640 BFS \ubc29\uc2dd \ubaa8\ub450 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 DFS\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud574\uacb0\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc758 \uc808\ucc28\ub85c \uc9c4\ud589\ub429\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\uadf8\ub798\ud504\ub97c \uc778\uc811 \ub9ac\uc2a4\ud2b8 \ud615\ud0dc\ub85c \ubcc0\ud658\ud569\ub2c8\ub2e4.<\/li>\n<li>\ubc29\ubb38 \uc5ec\ubd80\ub97c \uccb4\ud06c\ud558\uae30 \uc704\ud55c \ubc30\uc5f4\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li>\ubaa8\ub4e0 \uc815\uc810\uc5d0 \ub300\ud574 \ubc29\ubb38\ud558\uc9c0 \uc54a\uc740 \uc815\uc810\uc774 \uc788\uc73c\uba74 DFS\ub97c \uc2e4\ud589\ud558\uace0, \ud638\ucd9c\ub41c DFS \ub0b4\uc5d0\uc11c \ubaa8\ub4e0 \uc5f0\uacb0\ub41c \uc815\uc810\uc744 \ubc29\ubb38 \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<li>DFS\uac00 \ud638\ucd9c \ub420 \ub54c\ub9c8\ub2e4 \uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218\ub97c \ud558\ub098\uc529 \uc99d\uac00\uc2dc\ud0b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>4. \uc2a4\uc704\ud504\ud2b8 \uad6c\ud604<\/h2>\n<p>\ubb38\uc81c\ub97c \uc2a4\uc704\ud504\ud2b8\ub85c \uad6c\ud604\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>import Foundation\n\nvar graph = [[Int]]()\nvar visited: [Bool] = []\nvar connectedComponents = 0\n\n\/\/ DFS \ud568\uc218 \uc815\uc758\nfunc dfs(node: Int) {\n    visited[node] = true\n    \n    for neighbor in graph[node] {\n        if !visited[neighbor] {\n            dfs(node: neighbor)\n        }\n    }\n}\n\n\/\/ \uba54\uc778 \ud568\uc218\nfunc connectedComponentsCount(n: Int, edges: [(Int, Int)]) -&gt; Int {\n    graph = Array(repeating: [Int](), count: n + 1)\n    visited = Array(repeating: false, count: n + 1)\n    \n    \/\/ \uadf8\ub798\ud504 \uc0dd\uc131\n    for edge in edges {\n        let (a, b) = edge\n        graph[a].append(b)\n        graph[b].append(a)\n    }\n    \n    for i in 1...n {\n        if !visited[i] {\n            dfs(node: i)\n            connectedComponents += 1 \/\/ \uc0c8\ub85c\uc6b4 \uc5f0\uacb0 \uc694\uc18c \ubc1c\uacac\n        }\n    }\n    \n    return connectedComponents\n}\n\n\/\/ \uc0ac\uc6a9 \uc608\uc2dc\nlet n = 5\nlet edges = [(1, 2), (2, 3), (4, 5)]\nlet result = connectedComponentsCount(n: n, edges: edges)\nprint(\"\uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218: \\(result)\") \/\/ \ucd9c\ub825: \uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218: 2\n<\/code><\/pre>\n<h2>5. \uc54c\uace0\ub9ac\uc998 \ubd84\uc11d<\/h2>\n<p>\uc704\uc758 \uc54c\uace0\ub9ac\uc998\uc740 DFS\ub97c \uc774\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\ub97c \ud0d0\uc0c9\ud558\uae30 \ub54c\ubb38\uc5d0 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 O(V + E)\uc785\ub2c8\ub2e4. \uc5ec\uae30\uc11c V\ub294 \uc815\uc810\uc758 \uac1c\uc218, E\ub294 \uac04\uc120\uc758 \uac1c\uc218\uc785\ub2c8\ub2e4. \uc774 \uc54c\uace0\ub9ac\uc998\uc740 \uac01 \uc815\uc810\uc744 \ud55c \ubc88\uc529 \ubc29\ubb38\ud558\uace0, \uac01 \uac04\uc120\ub3c4 \ud55c \ubc88\uc529 \uac80\uc0ac\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4.<\/p>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 DFS\ub97c \uc774\uc6a9\ud558\uc5ec \uc5f0\uacb0 \uc694\uc18c\uc758 \uac1c\uc218\ub97c \uad6c\ud558\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uc18c\uac1c\ud588\uc2b5\ub2c8\ub2e4. DFS\uc640 BFS\ub294 \ubaa8\ub450 \uadf8\ub798\ud504 \ud0d0\uc0c9\uc5d0 \uc788\uc5b4 \uc911\uc694\ud55c \uae30\ubc95\uc774\ubbc0\ub85c, \uac01 \uc54c\uace0\ub9ac\uc998\uc758 \ud2b9\uc131\uacfc \uad6c\ud604 \ubc29\uc2dd\uc744 \ucda9\ubd84\ud788 \uc774\ud574\ud558\uace0 \uc5f0\uc2b5\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \ub2e4\uc74c \uac15\uc88c\uc5d0\uc11c\ub294 BFS\ub97c \uc0ac\uc6a9\ud55c \uc720\uc0ac\ud55c \ubb38\uc81c\ub97c \ub2e4\ub904\ubcfc \uc608\uc815\uc785\ub2c8\ub2e4.<\/p>\n<h2>7. \ucc38\uace0 \uc790\ub8cc<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.geeksforgeeks.org\/\">GeeksforGeeks<\/a><\/li>\n<li><a href=\"https:\/\/developer.apple.com\/swift\/\">Apple Swift Documentation<\/a><\/li>\n<li><a href=\"https:\/\/algorithms.tutorialhorizon.com\/\">Tutorial Horizon<\/a><\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ub4f1\uc7a5\ud558\ub294 \uc54c\uace0\ub9ac\uc998 \uc911 DFS(Depth-First Search)\uc640 BFS(Breadth-First Search)\ub294 \uadf8\ub798\ud504 \ubc0f \ud2b8\ub9ac \ud0d0\uc0c9\uc744 \uc704\ud55c \uae30\ubcf8\uc801\uc778 \ubc29\ubc95\ub860\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 \uc774 \ub450 \uac00\uc9c0 \uc54c\uace0\ub9ac\uc998\uc744 \uc2a4\uc704\ud504\ud2b8\ub85c \uad6c\ud604\ud558\uace0, \uc774\ub97c \ud65c\uc6a9\ud55c \ubb38\uc81c \ud480\uc774\ub97c \uc9c4\ud589\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. DFS\uc640 BFS \uac1c\uc694 DFS(Depth-First Search)\ub294 \ud55c \uacbd\ub85c\ub97c \ub05d\uae4c\uc9c0 \ud0d0\uc0c9\ud55c \ud6c4, \ub2e4\uc74c \uacbd\ub85c\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud558\uba70, \uc7ac\uadc0\uc801\uc73c\ub85c \ud638\ucd9c\ud558\uae30\ub3c4 \ud569\ub2c8\ub2e4. BFS(Breadth-First Search)\ub294 \uc2dc\uc791 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/28096\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8&#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":[27],"tags":[],"class_list":["post-28096","post","type-post","status-publish","format-standard","hentry","category-27"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \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\/28096\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ub4f1\uc7a5\ud558\ub294 \uc54c\uace0\ub9ac\uc998 \uc911 DFS(Depth-First Search)\uc640 BFS(Breadth-First Search)\ub294 \uadf8\ub798\ud504 \ubc0f \ud2b8\ub9ac \ud0d0\uc0c9\uc744 \uc704\ud55c \uae30\ubcf8\uc801\uc778 \ubc29\ubc95\ub860\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 \uc774 \ub450 \uac00\uc9c0 \uc54c\uace0\ub9ac\uc998\uc744 \uc2a4\uc704\ud504\ud2b8\ub85c \uad6c\ud604\ud558\uace0, \uc774\ub97c \ud65c\uc6a9\ud55c \ubb38\uc81c \ud480\uc774\ub97c \uc9c4\ud589\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. DFS\uc640 BFS \uac1c\uc694 DFS(Depth-First Search)\ub294 \ud55c \uacbd\ub85c\ub97c \ub05d\uae4c\uc9c0 \ud0d0\uc0c9\ud55c \ud6c4, \ub2e4\uc74c \uacbd\ub85c\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud558\uba70, \uc7ac\uadc0\uc801\uc73c\ub85c \ud638\ucd9c\ud558\uae30\ub3c4 \ud569\ub2c8\ub2e4. BFS(Breadth-First Search)\ub294 \uc2dc\uc791 &hellip; \ub354 \ubcf4\uae30 &quot;\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/28096\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T15:31:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:09:38+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=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8\",\"datePublished\":\"2024-10-27T15:31:42+00:00\",\"dateModified\":\"2024-11-26T07:09:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/\"},\"wordCount\":38,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/\",\"url\":\"https:\/\/atmokpo.com\/w\/28096\/\",\"name\":\"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T15:31:42+00:00\",\"dateModified\":\"2024-11-26T07:09:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/28096\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/28096\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8\"}]},{\"@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":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \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\/28096\/","og_locale":"ko_KR","og_type":"article","og_title":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ub4f1\uc7a5\ud558\ub294 \uc54c\uace0\ub9ac\uc998 \uc911 DFS(Depth-First Search)\uc640 BFS(Breadth-First Search)\ub294 \uadf8\ub798\ud504 \ubc0f \ud2b8\ub9ac \ud0d0\uc0c9\uc744 \uc704\ud55c \uae30\ubcf8\uc801\uc778 \ubc29\ubc95\ub860\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 \uc774 \ub450 \uac00\uc9c0 \uc54c\uace0\ub9ac\uc998\uc744 \uc2a4\uc704\ud504\ud2b8\ub85c \uad6c\ud604\ud558\uace0, \uc774\ub97c \ud65c\uc6a9\ud55c \ubb38\uc81c \ud480\uc774\ub97c \uc9c4\ud589\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. DFS\uc640 BFS \uac1c\uc694 DFS(Depth-First Search)\ub294 \ud55c \uacbd\ub85c\ub97c \ub05d\uae4c\uc9c0 \ud0d0\uc0c9\ud55c \ud6c4, \ub2e4\uc74c \uacbd\ub85c\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud558\uba70, \uc7ac\uadc0\uc801\uc73c\ub85c \ud638\ucd9c\ud558\uae30\ub3c4 \ud569\ub2c8\ub2e4. BFS(Breadth-First Search)\ub294 \uc2dc\uc791 &hellip; \ub354 \ubcf4\uae30 \"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8\"","og_url":"https:\/\/atmokpo.com\/w\/28096\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T15:31:42+00:00","article_modified_time":"2024-11-26T07:09:38+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":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/28096\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/28096\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8","datePublished":"2024-10-27T15:31:42+00:00","dateModified":"2024-11-26T07:09:38+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/28096\/"},"wordCount":38,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/28096\/","url":"https:\/\/atmokpo.com\/w\/28096\/","name":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T15:31:42+00:00","dateModified":"2024-11-26T07:09:38+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/28096\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/28096\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/28096\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"\uc2a4\uc704\ud504\ud2b8 \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, DFS\uc640 BFS \ud504\ub85c\uadf8\ub7a8"}]},{"@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\/28096","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=28096"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/28096\/revisions"}],"predecessor-version":[{"id":28097,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/28096\/revisions\/28097"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=28096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=28096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=28096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}