{"id":170,"date":"2018-05-13T20:11:45","date_gmt":"2018-05-13T12:11:45","guid":{"rendered":"https:\/\/www.ccagml.com\/?p=170"},"modified":"2018-11-27T17:12:28","modified_gmt":"2018-11-27T09:12:28","slug":"344-reverse-string","status":"publish","type":"post","link":"https:\/\/www.ccagml.com\/?p=170","title":{"rendered":"344. Reverse String"},"content":{"rendered":"<p>Write a function that takes a string as input and returns the string reversed.<\/p>\n<p><strong>Example 1:<\/strong><\/p>\n<div>\n<pre><strong>Input: <\/strong><span id=\"example-input-1-1\">\"hello\"<\/span>\r\n<strong>Output: <\/strong><span id=\"example-output-1\">\"olleh\"<\/span>\r\n<\/pre>\n<div>\n<p><strong>Example 2:<\/strong><\/p>\n<pre><strong>Input: <\/strong><span id=\"example-input-2-1\">\"A man, a plan, a canal: Panama\"<\/span>\r\n<strong>Output: <\/strong><span id=\"example-output-2\">\"amanaP :lanac a ,nalp a ,nam A\"<\/span><\/pre>\n<\/div>\n<\/div>\n<p><strong>Python<\/strong><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\"> \r\nclass Solution(object):\r\n    def reverseString(self, s):\r\n        &quot;&quot;&quot;\r\n        :type s: str\r\n        :rtype: str\r\n        &quot;&quot;&quot;\r\n        return s[::-1]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Write a function that takes a string as input and retur<a href=\"https:\/\/www.ccagml.com\/?p=170\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">344. Reverse String<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29,20],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/170"}],"collection":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=170"}],"version-history":[{"count":1,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ccagml.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}