{"id":68,"date":"2015-04-06T13:43:44","date_gmt":"2015-04-06T13:43:44","guid":{"rendered":"http:\/\/emacslisp.com\/?p=68"},"modified":"2015-04-09T12:08:06","modified_gmt":"2015-04-09T12:08:06","slug":"199-binary-tree-right-side-view","status":"publish","type":"post","link":"http:\/\/emacslisp.com\/?p=68","title":{"rendered":"199 Binary Tree Right Side View"},"content":{"rendered":"<p><span class=\"total-ac text-info\">Total Accepted: <strong>2068<\/strong><\/span> <span class=\"total-submit text-info\">Total Submissions: <strong>7422<\/strong><\/span><\/p>\n<div class=\"pull-right btn-group right-pad\"><\/div>\n<div class=\"question-title\"><\/div>\n<p>Given a binary tree, imagine yourself standing on the <i>right<\/i> side of it, return the values of the nodes you can see ordered from top to bottom.<\/p>\n<p>For example:<br \/>\nGiven the following binary tree,<\/p>\n<pre>   1            &lt;---\r\n \/   \\\r\n2     3         &lt;---\r\n \\     \\\r\n  5     4       &lt;---\r\n<\/pre>\n<p>You should return <code>[1, 3, 4]<\/code>.<\/p>\n<p>&nbsp;<\/p>\n<p>[code]<\/p>\n<p><a href=\"http:\/\/emacslisp.com\/wp-content\/uploads\/2015\/04\/binarySideView.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-75\" src=\"http:\/\/emacslisp.com\/wp-content\/uploads\/2015\/04\/binarySideView.png\" alt=\"binarySideView\" width=\"728\" height=\"923\" \/><\/a><\/p>\n<p>[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Total Accepted: 2068 Total Submissions: 7422 Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tree, 1 &lt;&#8212; \/ \\ 2 3 &lt;&#8212; \\ \\ 5 4 &lt;&#8212; You should return [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-algorithm"],"_links":{"self":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":3,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":77,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/77"}],"wp:attachment":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}