{"id":27782,"date":"2024-10-27T14:43:49","date_gmt":"2024-10-27T14:43:49","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=27782"},"modified":"2024-11-26T07:15:07","modified_gmt":"2024-11-26T07:15:07","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%88%9c%ed%9a%8c%ed%95%98%ea%b8%b0-2","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/27782\/","title":{"rendered":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30"},"content":{"rendered":"<p><body><\/p>\n<h2>\ubb38\uc81c \uc124\uba85<\/h2>\n<p>\uc774 \ubb38\uc81c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \uad6c\uc131\ud558\ub294 \ub178\ub4dc\uc758 \uac12\uc744 \ud2b9\uc815 \uc21c\uc11c\ub300\ub85c \ucd9c\ub825\ud558\ub294 \ud2b8\ub9ac \uc21c\ud68c \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774\uc9c4 \ud2b8\ub9ac\ub294 \uac01 \ub178\ub4dc\uac00 \ucd5c\ub300 \ub450 \uac1c\uc758 \uc790\uc2dd \ub178\ub4dc\ub97c \uac00\uc9c8 \uc218 \uc788\ub294 \uc790\ub8cc\uad6c\uc870\ub85c, \ub2e4\uc591\ud55c \ubc29\uc2dd\uc73c\ub85c \ub178\ub4dc\ub97c \ubc29\ubb38\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac00\uc7a5 \uc77c\ubc18\uc801\uc778 \ud2b8\ub9ac \uc21c\ud68c \ubc29\uc2dd\uc740 \uc804\uc704 \uc21c\ud68c, \uc911\uc704 \uc21c\ud68c, \ud6c4\uc704 \uc21c\ud68c\uc785\ub2c8\ub2e4.<\/p>\n<h3>\ud2b8\ub9ac\uc758 \uc815\uc758<\/h3>\n<pre>\n    struct TreeNode {\n        int val; \/\/ \ub178\ub4dc\uc758 \uac12\n        TreeNode *left; \/\/ \uc67c\ucabd \uc790\uc2dd \ub178\ub4dc\n        TreeNode *right; \/\/ \uc624\ub978\ucabd \uc790\uc2dd \ub178\ub4dc\n        TreeNode(int x) : val(x), left(NULL), right(NULL) {} \/\/ \uc0dd\uc131\uc790\n    };\n    <\/pre>\n<h2>\uc811\uadfc \ubc29\ubc95<\/h2>\n<p>\uac01 \uc21c\ud68c\uc758 \uc811\uadfc \ubc29\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><b>\uc804\uc704 \uc21c\ud68c (Preorder Traversal):<\/b> \ud604\uc7ac \ub178\ub4dc\ub97c \ubc29\ubb38\ud55c \ud6c4, \uc67c\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud558\uace0, \uc624\ub978\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud569\ub2c8\ub2e4.<\/li>\n<li><b>\uc911\uc704 \uc21c\ud68c (Inorder Traversal):<\/b> \uc67c\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud55c \ud6c4, \ud604\uc7ac \ub178\ub4dc\ub97c \ubc29\ubb38\ud558\uace0, \uc624\ub978\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud569\ub2c8\ub2e4.<\/li>\n<li><b>\ud6c4\uc704 \uc21c\ud68c (Postorder Traversal):<\/b> \uc67c\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud55c \ud6c4, \uc624\ub978\ucabd \uc790\uc2dd \ub178\ub4dc\ub97c \ubc29\ubb38\ud558\uace0, \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud604\uc7ac \ub178\ub4dc\ub97c \ubc29\ubb38\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>\uc804\uc704 \uc21c\ud68c \ucf54\ub4dc \uad6c\ud604<\/h3>\n<p>\uc544\ub798\ub294 C++\ub85c \uc804\uc704 \uc21c\ud68c\ub97c \uad6c\ud604\ud55c \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code> \n#include &lt;iostream&gt;\n#include &lt;vector&gt;\n\nusing namespace std;\n\nstruct TreeNode {\n    int val;\n    TreeNode *left;\n    TreeNode *right;\n    TreeNode(int x) : val(x), left(NULL), right(NULL) {}\n};\n\nvoid preorderTraversal(TreeNode* root, vector<int>&amp; result) {\n    if (root == nullptr) return; \/\/ \uae30\ubcf8 \uc0ac\ub840\n    result.push_back(root-&gt;val); \/\/ \ub178\ub4dc \ubc29\ubb38\n    preorderTraversal(root-&gt;left, result); \/\/ \uc67c\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n    preorderTraversal(root-&gt;right, result); \/\/ \uc624\ub978\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n}\n\nint main() {\n    \/\/ \uc774\uc9c4 \ud2b8\ub9ac \ucd08\uae30\ud654\n    TreeNode* root = new TreeNode(1);\n    root-&gt;left = new TreeNode(2);\n    root-&gt;right = new TreeNode(3);\n    root-&gt;left-&gt;left = new TreeNode(4);\n    root-&gt;left-&gt;right = new TreeNode(5);\n    \n    vector<int> result;\n    preorderTraversal(root, result);\n    \n    \/\/ \uacb0\uacfc \ucd9c\ub825\n    for (int val : result) {\n        cout &lt;&lt; val &lt;&lt; \" \";\n    }\n    return 0;\n}\n    <\/int><\/int><\/code><\/pre>\n<h3>\uc911\uc704 \uc21c\ud68c \ucf54\ub4dc \uad6c\ud604<\/h3>\n<p>\uc544\ub798\ub294 C++\ub85c \uc911\uc704 \uc21c\ud68c\ub97c \uad6c\ud604\ud55c \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>\nvoid inorderTraversal(TreeNode* root, vector<int>&amp; result) {\n    if (root == nullptr) return; \/\/ \uae30\ubcf8 \uc0ac\ub840\n    inorderTraversal(root-&gt;left, result); \/\/ \uc67c\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n    result.push_back(root-&gt;val); \/\/ \ub178\ub4dc \ubc29\ubb38\n    inorderTraversal(root-&gt;right, result); \/\/ \uc624\ub978\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n}\n\n\/\/ main \ud568\uc218\ub294 \uc774\uc804\uacfc \ub3d9\uc77c\n    <\/int><\/code><\/pre>\n<h3>\ud6c4\uc704 \uc21c\ud68c \ucf54\ub4dc \uad6c\ud604<\/h3>\n<p>\uc544\ub798\ub294 C++\ub85c \ud6c4\uc704 \uc21c\ud68c\ub97c \uad6c\ud604\ud55c \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>\nvoid postorderTraversal(TreeNode* root, vector<int>&amp; result) {\n    if (root == nullptr) return; \/\/ \uae30\ubcf8 \uc0ac\ub840\n    postorderTraversal(root-&gt;left, result); \/\/ \uc67c\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n    postorderTraversal(root-&gt;right, result); \/\/ \uc624\ub978\ucabd \uc11c\ube0c\ud2b8\ub9ac \ubc29\ubb38\n    result.push_back(root-&gt;val); \/\/ \ub178\ub4dc \ubc29\ubb38\n}\n\n\/\/ main \ud568\uc218\ub294 \uc774\uc804\uacfc \ub3d9\uc77c\n    <\/int><\/code><\/pre>\n<h2>\uc2dc\uac04 \ubcf5\uc7a1\ub3c4 \ubc0f \ucd5c\uc801\ud654<\/h2>\n<p>\uac01 \ud2b8\ub9ac \uc21c\ud68c \ubc29\ubc95\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 O(n)\uc785\ub2c8\ub2e4. \uc774\ub294 \ud2b8\ub9ac\uc758 \ubaa8\ub4e0 \ub178\ub4dc\ub97c \ud55c \ubc88\uc529 \ubc29\ubb38\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \uacf5\uac04 \ubcf5\uc7a1\ub3c4\ub294 \ud2b8\ub9ac\uac00 \uc644\uc804\ud558\uc9c0 \uc54a\uc744 \uacbd\uc6b0 \ucd5c\uc545\uc758 \uacbd\uc6b0 O(h) (h\ub294 \ud2b8\ub9ac\uc758 \ub192\uc774)\uc785\ub2c8\ub2e4. \ub9cc\uc57d \ud2b8\ub9ac\uac00 \uc120\ud615\uc801\uc778 \ud615\ud0dc\ub77c\uba74 O(n) \uacf5\uac04\uc774 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>\ucd5c\uc801\ud654 \ubc29\ubc95<\/h3>\n<p>\ud2b8\ub9ac \uc21c\ud68c \uc131\ub2a5\uc744 \ub354\uc6b1 \uac1c\uc120\ud558\uae30 \uc704\ud574 \uc2a4\ud0dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \ubc18\ubcf5\uc801\uc778 \ubc29\ubc95\uc73c\ub85c \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \uc804\uc704 \uc21c\ud68c\ub97c \ubc18\ubcf5\uc801\uc73c\ub85c \uad6c\ud604\ud560 \ub54c\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code>\n#include &lt;stack&gt;\n\nvoid iterativePreorderTraversal(TreeNode* root, vector<int>&amp; result) {\n    if (root == nullptr) return; \n    stack<treenode*> stk;\n    stk.push(root);\n\n    while (!stk.empty()) {\n        TreeNode* node = stk.top();\n        stk.pop();\n        result.push_back(node-&gt;val); \/\/ \ub178\ub4dc \ubc29\ubb38\n        if (node-&gt;right != nullptr) stk.push(node-&gt;right); \/\/ \uc624\ub978\ucabd \uc790\uc2dd \uba3c\uc800 \ucd94\uac00\n        if (node-&gt;left != nullptr) stk.push(node-&gt;left); \/\/ \uc67c\ucabd \uc790\uc2dd \ucd94\uac00\n    }\n}\n\n\/\/ main \ud568\uc218\ub294 \uc774\uc804\uacfc \ub3d9\uc77c\n    <\/treenode*><\/int><\/code><\/pre>\n<h2>\uacb0\ub860<\/h2>\n<p>\uc774 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc774\uc9c4 \ud2b8\ub9ac\uc758 \ub2e4\uc591\ud55c \uc21c\ud68c \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud588\uc2b5\ub2c8\ub2e4. \uac01 \uc21c\ud68c\uc758 \ubc29\ubc95\ub860\uc744 \uc774\ud574\ud558\uace0, \uad6c\uccb4\uc801\uc778 \ucf54\ub4dc\ub97c \uc791\uc131\ud558\uc5ec \uc774\ub97c \uc2e4\uc2b5\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \uc774\uc9c4 \ud2b8\ub9ac\ub294 \ub2e4\uc591\ud55c \ubd84\uc57c\uc5d0\uc11c \uc911\uc694\ud55c \uc5ed\ud560\uc744 \ud558\ubbc0\ub85c \ud655\uc2e4\ud788 \uc775\ud600\ub450\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\ucc38\uace0 \uc790\ub8cc<\/h2>\n<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Tree_traversal\">Wikipedia: Tree Traversal<\/a><\/li>\n<li><a href=\"https:\/\/www.geeksforgeeks.org\/tree-traversals-inorder-preorder-and-postorder\/\">GeeksforGeeks: Tree Traversals<\/a><\/li>\n<li><a href=\"https:\/\/www.learncpp.com\/cpp-tutorial\/3-2-constructing-and-destroying-a-binary-tree\/\">LearnCpp: Constructing a Binary Tree<\/a><\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubb38\uc81c \uc124\uba85 \uc774 \ubb38\uc81c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \uad6c\uc131\ud558\ub294 \ub178\ub4dc\uc758 \uac12\uc744 \ud2b9\uc815 \uc21c\uc11c\ub300\ub85c \ucd9c\ub825\ud558\ub294 \ud2b8\ub9ac \uc21c\ud68c \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774\uc9c4 \ud2b8\ub9ac\ub294 \uac01 \ub178\ub4dc\uac00 \ucd5c\ub300 \ub450 \uac1c\uc758 \uc790\uc2dd \ub178\ub4dc\ub97c \uac00\uc9c8 \uc218 \uc788\ub294 \uc790\ub8cc\uad6c\uc870\ub85c, \ub2e4\uc591\ud55c \ubc29\uc2dd\uc73c\ub85c \ub178\ub4dc\ub97c \ubc29\ubb38\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac00\uc7a5 \uc77c\ubc18\uc801\uc778 \ud2b8\ub9ac \uc21c\ud68c \ubc29\uc2dd\uc740 \uc804\uc704 \uc21c\ud68c, \uc911\uc704 \uc21c\ud68c, \ud6c4\uc704 \uc21c\ud68c\uc785\ub2c8\ub2e4. \ud2b8\ub9ac\uc758 \uc815\uc758 struct TreeNode { int val; \/\/ &hellip; <a href=\"https:\/\/atmokpo.com\/w\/27782\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\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-27782","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 \uc21c\ud68c\ud558\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\/27782\/\" \/>\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 \uc21c\ud68c\ud558\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ubb38\uc81c \uc124\uba85 \uc774 \ubb38\uc81c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \uad6c\uc131\ud558\ub294 \ub178\ub4dc\uc758 \uac12\uc744 \ud2b9\uc815 \uc21c\uc11c\ub300\ub85c \ucd9c\ub825\ud558\ub294 \ud2b8\ub9ac \uc21c\ud68c \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774\uc9c4 \ud2b8\ub9ac\ub294 \uac01 \ub178\ub4dc\uac00 \ucd5c\ub300 \ub450 \uac1c\uc758 \uc790\uc2dd \ub178\ub4dc\ub97c \uac00\uc9c8 \uc218 \uc788\ub294 \uc790\ub8cc\uad6c\uc870\ub85c, \ub2e4\uc591\ud55c \ubc29\uc2dd\uc73c\ub85c \ub178\ub4dc\ub97c \ubc29\ubb38\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac00\uc7a5 \uc77c\ubc18\uc801\uc778 \ud2b8\ub9ac \uc21c\ud68c \ubc29\uc2dd\uc740 \uc804\uc704 \uc21c\ud68c, \uc911\uc704 \uc21c\ud68c, \ud6c4\uc704 \uc21c\ud68c\uc785\ub2c8\ub2e4. \ud2b8\ub9ac\uc758 \uc815\uc758 struct TreeNode { int val; \/\/ &hellip; \ub354 \ubcf4\uae30 &quot;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/27782\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T14:43:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:15:07+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\/27782\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27782\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30\",\"datePublished\":\"2024-10-27T14:43:49+00:00\",\"dateModified\":\"2024-11-26T07:15:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27782\/\"},\"wordCount\":29,\"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\/27782\/\",\"url\":\"https:\/\/atmokpo.com\/w\/27782\/\",\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T14:43:49+00:00\",\"dateModified\":\"2024-11-26T07:15:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27782\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/27782\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/27782\/#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 \uc21c\ud68c\ud558\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 \uc21c\ud68c\ud558\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\/27782\/","og_locale":"ko_KR","og_type":"article","og_title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ubb38\uc81c \uc124\uba85 \uc774 \ubb38\uc81c\ub294 \uc774\uc9c4 \ud2b8\ub9ac\ub97c \uad6c\uc131\ud558\ub294 \ub178\ub4dc\uc758 \uac12\uc744 \ud2b9\uc815 \uc21c\uc11c\ub300\ub85c \ucd9c\ub825\ud558\ub294 \ud2b8\ub9ac \uc21c\ud68c \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774\uc9c4 \ud2b8\ub9ac\ub294 \uac01 \ub178\ub4dc\uac00 \ucd5c\ub300 \ub450 \uac1c\uc758 \uc790\uc2dd \ub178\ub4dc\ub97c \uac00\uc9c8 \uc218 \uc788\ub294 \uc790\ub8cc\uad6c\uc870\ub85c, \ub2e4\uc591\ud55c \ubc29\uc2dd\uc73c\ub85c \ub178\ub4dc\ub97c \ubc29\ubb38\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac00\uc7a5 \uc77c\ubc18\uc801\uc778 \ud2b8\ub9ac \uc21c\ud68c \ubc29\uc2dd\uc740 \uc804\uc704 \uc21c\ud68c, \uc911\uc704 \uc21c\ud68c, \ud6c4\uc704 \uc21c\ud68c\uc785\ub2c8\ub2e4. \ud2b8\ub9ac\uc758 \uc815\uc758 struct TreeNode { int val; \/\/ &hellip; \ub354 \ubcf4\uae30 \"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30\"","og_url":"https:\/\/atmokpo.com\/w\/27782\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T14:43:49+00:00","article_modified_time":"2024-11-26T07:15:07+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\/27782\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/27782\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30","datePublished":"2024-10-27T14:43:49+00:00","dateModified":"2024-11-26T07:15:07+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/27782\/"},"wordCount":29,"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\/27782\/","url":"https:\/\/atmokpo.com\/w\/27782\/","name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \ud2b8\ub9ac \uc21c\ud68c\ud558\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T14:43:49+00:00","dateModified":"2024-11-26T07:15:07+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/27782\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/27782\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/27782\/#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 \uc21c\ud68c\ud558\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\/27782","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=27782"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27782\/revisions"}],"predecessor-version":[{"id":27783,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27782\/revisions\/27783"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=27782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=27782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=27782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}