{"id":27786,"date":"2024-10-27T14:43:51","date_gmt":"2024-10-27T14:43:51","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=27786"},"modified":"2024-11-26T07:15:02","modified_gmt":"2024-11-26T07:15:02","slug":"c-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ed%8a%b8%eb%a6%ac%ec%9d%98-%eb%b6%80%eb%aa%a8-%ec%b0%be%ea%b8%b0-2","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/27786\/","title":{"rendered":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30"},"content":{"rendered":"<p><body><\/p>\n<h2>\ubb38\uc81c \uc124\uba85<\/h2>\n<p>\uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc138\uc694. \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc\ub294 \uc22b\uc790\ub85c \ub808\uc774\ube14\uc774 \ubd99\uc5b4 \uc788\uc73c\uba70, \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \uc815\uc758\ub429\ub2c8\ub2e4:<\/p>\n<pre><code>\n    struct Node {\n        int value;\n        Node* left;\n        Node* right;\n        \n        Node(int val) : value(val), left(nullptr), right(nullptr) {}\n    };\n    <\/code><\/pre>\n<p>\uc785\ub825\uc73c\ub85c\ub294 \ub178\ub4dc\uc758 \ub9ac\uc2a4\ud2b8\uc640 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \uac12\uc774 \uc8fc\uc5b4\uc9d1\ub2c8\ub2e4. \ucd9c\ub825\uc73c\ub85c\ub294 \ud574\ub2f9 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\uc758 \uac12\uc774 \ucd9c\ub825\ub418\uc5b4\uc57c \ud558\uba70, \ubd80\ubaa8 \ub178\ub4dc\uac00 \uc5c6\ub294 \uacbd\uc6b0\uc5d0\ub294 -1\uc744 \ubc18\ud658\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<h2>\uc608\uc2dc<\/h2>\n<pre><code>\n    \uc785\ub825:\n    5\n    2 1\n    7 3\n    6 4\n    0 -1\n    \uc694\uccad \ub178\ub4dc: 3\n    \n    \ucd9c\ub825:\n    7\n    <\/code><\/pre>\n<h2>\ubb38\uc81c \uc811\uadfc \ubc29\uc2dd<\/h2>\n<p>\ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \ud0d0\uc0c9\ud558\uc5ec \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8\ub97c \ud30c\uc545\ud558\ub294 \ubc29\ubc95\uc744 \uc0ac\uc6a9\ud560 \uac83\uc785\ub2c8\ub2e4. \uc6b0\ub9ac\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uacfc\uc815\uc744 \ub530\ub985\ub2c8\ub2e4:<\/p>\n<ol>\n<li>\ud2b8\ub9ac\uc758 \ub8e8\ud2b8 \ub178\ub4dc\ub97c \uc2dc\uc791\uc810\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud050\ub97c \uc0ac\uc6a9\ud558\uc5ec BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9) \ubc29\uc2dd\uc73c\ub85c \ud2b8\ub9ac\uc758 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud569\ub2c8\ub2e4.<\/li>\n<li>\uac01 \ub178\ub4dc\ub97c \ud655\uc778\ud558\uace0 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \ubd80\ubaa8\ub97c \uc800\uc7a5\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc694\uccad\ub41c \ub178\ub4dc\ub97c \ucc3e\uc73c\uba74 \ud574\ub2f9 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<h2>\ucf54\ub4dc \uad6c\ud604<\/h2>\n<pre><code>\n    #include <iostream>\n    #include <unordered_map>\n    #include <queue>\n    using namespace std;\n\n    struct Node {\n        int value;\n        Node* left;\n        Node* right;\n\n        Node(int val) : value(val), left(nullptr), right(nullptr) {}\n    };\n\n    Node* buildTree(const vector<pair<int, int=\"\">&gt;&amp; nodes) {\n        unordered_map<int, node*=\"\"> nodeMap;\n        for (const auto&amp; p : nodes) {\n            int child = p.first;\n            int parent = p.second;\n\n            if (nodeMap.find(child) == nodeMap.end())\n                nodeMap[child] = new Node(child);\n\n            if (parent != -1) {\n                if (nodeMap.find(parent) == nodeMap.end())\n                    nodeMap[parent] = new Node(parent);\n\n                if (!nodeMap[parent]-&gt;left)\n                    nodeMap[parent]-&gt;left = nodeMap[child];\n                else\n                    nodeMap[parent]-&gt;right = nodeMap[child];\n            }\n        }\n        return nodeMap.begin()-&gt;second; \/\/ \uccab\ubc88\uc9f8\ub85c \ucd94\uac00\ub41c \ub178\ub4dc\ub97c \ub8e8\ud2b8\ub85c \ubc18\ud658\n    }\n\n    int findParent(Node* root, int target) {\n        if (!root) return -1;\n\n        queue<node*> q;\n        q.push(root);\n        Node* parent = nullptr;\n\n        while (!q.empty()) {\n            int size = q.size();\n            for (int i = 0; i &lt; size; ++i) {\n                Node* current = q.front();\n                q.pop();\n                \n                if (current-&gt;left) {\n                    if (current-&gt;left-&gt;value == target) {\n                        return current-&gt;value;\n                    }\n                    q.push(current-&gt;left);\n                }\n\n                if (current-&gt;right) {\n                    if (current-&gt;right-&gt;value == target) {\n                        return current-&gt;value;\n                    }\n                    q.push(current-&gt;right);\n                }\n            }\n        }\n        \n        return -1; \/\/ \ubd80\ubaa8\ub97c \ucc3e\uc9c0 \ubabb\ud55c \uacbd\uc6b0\n    }\n\n    int main() {\n        \/\/ \ud2b8\ub9ac \uad6c\uc131: (child, parent)\n        vector<pair<int, int=\"\">&gt; nodes = {{2, 1}, {7, 3}, {6, 4}, {5, -1}};\n\n        Node* root = buildTree(nodes); \/\/ \ud2b8\ub9ac \ube4c\ub4dc\n        int target = 3; \/\/ \uc694\uccad \ub178\ub4dc\n        int parentValue = findParent(root, target);\n\n        cout &lt;&lt; parentValue &lt;&lt; endl; \/\/ \ubd80\ubaa8 \ucd9c\ub825\n\n        return 0;\n    }\n    <\/pair<int,><\/node*><\/int,><\/pair<int,><\/queue><\/unordered_map><\/iostream><\/code><\/pre>\n<h2>\ucf54\ub4dc \uc124\uba85<\/h2>\n<p>\uc704 \ucf54\ub4dc\ub294 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \ub9cc\ub4e4\uace0 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \ubd80\ubaa8\ub97c \ucc3e\ub294 \uc804\ubc18\uc801\uc778 \uacfc\uc815\uc744 \ubcf4\uc5ec\uc90d\ub2c8\ub2e4.<\/p>\n<ul>\n<li>\n<strong>buildTree<\/strong>: \uc8fc\uc5b4\uc9c4 (child, parent) \ub9ac\uc2a4\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud2b8\ub9ac\ub97c \uad6c\uc131\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. \uac01 \ub178\ub4dc\ub97c \ub9f5\uc5d0 \uc800\uc7a5\ud558\uc5ec \ubd80\ubaa8-\uc790\uc2dd \uad00\uacc4\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n        <\/li>\n<li>\n<strong>findParent<\/strong>: BFS\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc694\uccad\ub41c \uac12\uc758 \ubd80\ubaa8\ub97c \ucc3e\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. \uac01 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud558\uba74\uc11c \uc790\uc2dd \ub178\ub4dc\uac00 \uc694\uccad\ub41c \uac12\uacfc \uac19\uc73c\uba74 \ud604\uc7ac \ub178\ub4dc\uc758 \uac12\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4.\n        <\/li>\n<li>\n<strong>main<\/strong>: \ud504\ub85c\uadf8\ub7a8\uc758 \uc9c4\uc785\uc810\uc73c\ub85c, \uc0d8\ud50c \uc785\ub825\uc744 \ud1b5\ud574 \ud2b8\ub9ac\ub97c \ube4c\ub4dc\ud558\uace0 \ubd80\ubaa8\ub97c \ucc3e\uc2b5\ub2c8\ub2e4.\n        <\/li>\n<\/ul>\n<h2>\uc885\ud569 \uc815\ub9ac<\/h2>\n<p>\uc774 \ubb38\uc81c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\uc758 \uae30\ubcf8 \uad6c\uc870\ub97c \uc774\ud574\ud558\uace0, \uc790\ub8cc\uad6c\uc870\ub97c \ud6a8\uacfc\uc801\uc73c\ub85c \ud65c\uc6a9\ud558\ub294 \ubc29\ubc95\uc744 \ubc30\uc6b0\ub294 \ub370 \uc720\uc775\ud569\ub2c8\ub2e4. BFS\ub97c \ud1b5\ud574 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud558\uba70 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucc3e\ub294 \uacfc\uc815\uc740 \uc2e4\ubb34\uc5d0\uc11c\ub3c4 \ub9ce\uc774 \uc0ac\uc6a9\ub418\ub294 \uc811\uadfc \ubc29\ubc95\uc785\ub2c8\ub2e4. \uac01 \ub2e8\uacc4\ubcc4\ub85c \uc8fc\uc758\ub97c \uae30\uc6b8\uc5ec\uc57c \ud558\uba70, \uc608\uc678 \ucc98\ub9ac\ub97c \ud1b5\ud574 \ubb38\uc81c\ub97c \uc608\ubc29\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\ucd94\uac00 \ubb38\uc81c<\/h2>\n<p>\uc774 \ubb38\uc81c\uc758 \ubcc0\ud615\uc73c\ub85c, \ud2b9\uc815 \ub178\ub4dc\uc758 \uc790\uc2dd \ub178\ub4dc\ub4e4\uc744 \ucc3e\ub294 \ubb38\uc81c\ub098, \ud2b8\ub9ac\uc758 \uae4a\uc774\ub97c \uad6c\ud558\ub294 \ubb38\uc81c \ub4f1\uc744 \uace0\ub824\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc591\ud55c \ubcc0\ud615 \ubb38\uc81c\ub97c \ud1b5\ud574 \ud2b8\ub9ac\uc5d0 \ub300\ud55c \uc774\ud574\ub97c \ub354\uc6b1 \uae4a\uac8c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\ud301 \ubc0f \uc8fc\uc758\uc0ac\ud56d<\/h2>\n<ul>\n<li>\uc7ac\uadc0\ub97c \uc0ac\uc6a9\ud560 \ub54c\ub294 \ubb34\ud55c \ub8e8\ud504\uc5d0 \ube60\uc9c0\uc9c0 \uc54a\ub3c4\ub85d \uc8fc\uc758\ud574\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>\ub178\ub4dc\uc758 \ubd80\ubaa8\uac00 \uc5c6\ub294 \uacbd\uc6b0\ub97c \ucc98\ub9ac\ud558\uae30 \uc704\ud55c \uc870\uac74\uc744 \uba85\ud655\ud788 \uc124\uc815\ud574\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<li>\ud2b8\ub9ac\uc758 \uad6c\uc870\uc5d0 \ub530\ub77c \uc54c\uace0\ub9ac\uc998\uc758 \uc131\ub2a5\uc774 \ub2ec\ub77c\uc9c8 \uc218 \uc788\uc73c\ub2c8, \ub2e4\uc591\ud55c \uacbd\uc6b0\ub97c \uc2e4\ud5d8\ud574\ubcf4\uc138\uc694.<\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc138\uc694. \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc\ub294 \uc22b\uc790\ub85c \ub808\uc774\ube14\uc774 \ubd99\uc5b4 \uc788\uc73c\uba70, \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \uc815\uc758\ub429\ub2c8\ub2e4: struct Node { int value; Node* left; Node* right; Node(int val) : value(val), left(nullptr), right(nullptr) {} }; \uc785\ub825\uc73c\ub85c\ub294 \ub178\ub4dc\uc758 \ub9ac\uc2a4\ud2b8\uc640 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \uac12\uc774 \uc8fc\uc5b4\uc9d1\ub2c8\ub2e4. \ucd9c\ub825\uc73c\ub85c\ub294 \ud574\ub2f9 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\uc758 \uac12\uc774 \ucd9c\ub825\ub418\uc5b4\uc57c \ud558\uba70, &hellip; <a href=\"https:\/\/atmokpo.com\/w\/27786\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30&#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":[25],"tags":[],"class_list":["post-27786","post","type-post","status-publish","format-standard","hentry","category-c---2"],"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, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \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\/27786\/\" \/>\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, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc138\uc694. \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc\ub294 \uc22b\uc790\ub85c \ub808\uc774\ube14\uc774 \ubd99\uc5b4 \uc788\uc73c\uba70, \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \uc815\uc758\ub429\ub2c8\ub2e4: struct Node { int value; Node* left; Node* right; Node(int val) : value(val), left(nullptr), right(nullptr) {} }; \uc785\ub825\uc73c\ub85c\ub294 \ub178\ub4dc\uc758 \ub9ac\uc2a4\ud2b8\uc640 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \uac12\uc774 \uc8fc\uc5b4\uc9d1\ub2c8\ub2e4. \ucd9c\ub825\uc73c\ub85c\ub294 \ud574\ub2f9 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\uc758 \uac12\uc774 \ucd9c\ub825\ub418\uc5b4\uc57c \ud558\uba70, &hellip; \ub354 \ubcf4\uae30 &quot;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/27786\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T14:43:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:15:02+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<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/27786\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27786\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30\",\"datePublished\":\"2024-10-27T14:43:51+00:00\",\"dateModified\":\"2024-11-26T07:15:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27786\/\"},\"wordCount\":11,\"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\/27786\/\",\"url\":\"https:\/\/atmokpo.com\/w\/27786\/\",\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T14:43:51+00:00\",\"dateModified\":\"2024-11-26T07:15:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27786\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/27786\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/27786\/#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, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30\"}]},{\"@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, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \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\/27786\/","og_locale":"ko_KR","og_type":"article","og_title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uc774\uc9c4 \ud2b8\ub9ac\uc5d0\uc11c \uac01 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\ub97c \ucc3e\ub294 \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\uc138\uc694. \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub178\ub4dc\ub294 \uc22b\uc790\ub85c \ub808\uc774\ube14\uc774 \ubd99\uc5b4 \uc788\uc73c\uba70, \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub85c \uc815\uc758\ub429\ub2c8\ub2e4: struct Node { int value; Node* left; Node* right; Node(int val) : value(val), left(nullptr), right(nullptr) {} }; \uc785\ub825\uc73c\ub85c\ub294 \ub178\ub4dc\uc758 \ub9ac\uc2a4\ud2b8\uc640 \uc694\uccad\ub41c \ub178\ub4dc\uc758 \uac12\uc774 \uc8fc\uc5b4\uc9d1\ub2c8\ub2e4. \ucd9c\ub825\uc73c\ub85c\ub294 \ud574\ub2f9 \ub178\ub4dc\uc758 \ubd80\ubaa8 \ub178\ub4dc\uc758 \uac12\uc774 \ucd9c\ub825\ub418\uc5b4\uc57c \ud558\uba70, &hellip; \ub354 \ubcf4\uae30 \"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30\"","og_url":"https:\/\/atmokpo.com\/w\/27786\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T14:43:51+00:00","article_modified_time":"2024-11-26T07:15:02+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/27786\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/27786\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30","datePublished":"2024-10-27T14:43:51+00:00","dateModified":"2024-11-26T07:15:02+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/27786\/"},"wordCount":11,"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\/27786\/","url":"https:\/\/atmokpo.com\/w\/27786\/","name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T14:43:51+00:00","dateModified":"2024-11-26T07:15:02+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/27786\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/27786\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/27786\/#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, \ud2b8\ub9ac\uc758 \ubd80\ubaa8 \ucc3e\uae30"}]},{"@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\/27786","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=27786"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27786\/revisions"}],"predecessor-version":[{"id":27787,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27786\/revisions\/27787"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=27786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=27786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=27786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}