{"id":228,"date":"2021-11-02T18:11:38","date_gmt":"2021-11-02T18:11:38","guid":{"rendered":"http:\/\/www.gislxz.top\/?p=228"},"modified":"2023-03-26T12:45:49","modified_gmt":"2023-03-26T12:45:49","slug":"leetcode26-vector%e7%bb%93%e6%9e%84%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.gislxz.com\/index.php\/2021\/11\/02\/leetcode26-vector%e7%bb%93%e6%9e%84%e7%ac%94%e8%ae%b0\/","title":{"rendered":"LeetCode26-Vector\u7ed3\u6784\u7b14\u8bb0"},"content":{"rendered":"\n<p>LeetCode26\u662f\u4e00\u9053\u96be\u5ea6\u4e3aeasy\u7684\u9898\u76ee\uff0c\u8981\u6c42\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>\u7ed9\u4f60\u4e00\u4e2a\u6709\u5e8f\u6570\u7ec4 nums \uff0c\u8bf7\u4f60 \u539f\u5730 \u5220\u9664\u91cd\u590d\u51fa\u73b0\u7684\u5143\u7d20\uff0c\u4f7f\u6bcf\u4e2a\u5143\u7d20 \u53ea\u51fa\u73b0\u4e00\u6b21 \uff0c\u8fd4\u56de\u5220\u9664\u540e\u6570\u7ec4\u7684\u65b0\u957f\u5ea6\u3002<\/p>\n\n\n\n<p>\u4e0d\u8981\u4f7f\u7528\u989d\u5916\u7684\u6570\u7ec4\u7a7a\u95f4\uff0c\u4f60\u5fc5\u987b\u5728 \u539f\u5730 \u4fee\u6539\u8f93\u5165\u6570\u7ec4 \u5e76\u5728\u4f7f\u7528 O(1) \u989d\u5916\u7a7a\u95f4\u7684\u6761\u4ef6\u4e0b\u5b8c\u6210<\/p>\n\n\n\n<p>\u9898\u76ee\u7ed9\u7684\u539f\u59cb\u89e3\u9898\u51fd\u6570\u683c\u5f0f\u5982\u4e0b\uff0c\u53ef\u89c1\u662f\u4e2avector\u7ed3\u6784<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Solution {\npublic:\n    int removeDuplicates(vector&lt;int&gt;&amp; nums) {\n\n    }\n};<\/code><\/pre>\n\n\n\n<p>\u603b\u662f\u4e0d\u8bb0\u5f97vector\u683c\u5f0f\u600e\u4e48\u7528\uff0c\u56e0\u6b64\u5f00\u4e00\u8d34\u8bb0\u5f55\u4e00\u4e0b<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Vector\u662f\u4ec0\u4e48\uff1f<\/strong><\/p>\n\n\n\n<p>\u5411\u91cf\uff08Vector\uff09\u662f\u4e00\u4e2a\u5c01\u88c5\u4e86\u52a8\u6001\u5927\u5c0f\u6570\u7ec4\u7684\u987a\u5e8f\u5bb9\u5668\uff08Sequence Container\uff09\u3002\u8ddf\u4efb\u610f\u5176\u5b83\u7c7b\u578b\u5bb9\u5668\u4e00\u6837\uff0c\u5b83\u80fd\u591f\u5b58\u653e\u5404\u79cd\u7c7b\u578b\u7684\u5bf9\u8c61\u3002\u53ef\u4ee5\u7b80\u5355\u7684\u8ba4\u4e3a\uff0c\u5411\u91cf\u662f\u4e00\u4e2a\u80fd\u591f\u5b58\u653e\u4efb\u610f\u7c7b\u578b\u7684\u52a8\u6001\u6570\u7ec4\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Vector\u6709\u4f55\u7279\u6027\uff1f<\/strong><\/p>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">1.\u987a\u5e8f\u5e8f\u5217<\/h3>\n\n\n\n<p>\u987a\u5e8f\u5bb9\u5668\u4e2d\u7684\u5143\u7d20\u6309\u7167\u4e25\u683c\u7684\u7ebf\u6027\u987a\u5e8f\u6392\u5e8f\u3002\u53ef\u4ee5\u901a\u8fc7\u5143\u7d20\u5728\u5e8f\u5217\u4e2d\u7684\u4f4d\u7f6e\u8bbf\u95ee\u5bf9\u5e94\u7684\u5143\u7d20\u3002<\/p>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">2.\u52a8\u6001\u6570\u7ec4<\/h3>\n\n\n\n<p>\u652f\u6301\u5bf9\u5e8f\u5217\u4e2d\u7684\u4efb\u610f\u5143\u7d20\u8fdb\u884c\u5feb\u901f\u76f4\u63a5\u8bbf\u95ee\uff0c\u751a\u81f3\u53ef\u4ee5\u901a\u8fc7\u6307\u9488\u7b97\u8ff0\u8fdb\u884c\u8be5\u64cd\u4f5c\u3002\u63d0\u4f9b\u4e86\u5728\u5e8f\u5217\u672b\u5c3e\u76f8\u5bf9\u5feb\u901f\u5730\u6dfb\u52a0\/\u5220\u9664\u5143\u7d20\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">3.\u80fd\u591f\u611f\u77e5\u5185\u5b58\u5206\u914d\u5668\u7684\uff08Allocator-aware\uff09<\/h3>\n\n\n\n<p>\u5bb9\u5668\u4f7f\u7528\u4e00\u4e2a\u5185\u5b58\u5206\u914d\u5668\u5bf9\u8c61\u6765\u52a8\u6001\u5730\u5904\u7406\u5b83\u7684\u5b58\u50a8\u9700\u6c42\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u57fa\u672c\u51fd\u6570\u5b9e\u73b0<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">1<strong>.\u6784\u9020\u51fd\u6570<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>vector():\u521b\u5efa\u4e00\u4e2a\u7a7avector<\/li><li>vector(int nSize):\u521b\u5efa\u4e00\u4e2avector,\u5143\u7d20\u4e2a\u6570\u4e3anSize<\/li><li>vector(int nSize,const t&amp; t):\u521b\u5efa\u4e00\u4e2avector\uff0c\u5143\u7d20\u4e2a\u6570\u4e3anSize,\u4e14\u503c\u5747\u4e3at<\/li><li>vector(const vector&amp;):\u590d\u5236\u6784\u9020\u51fd\u6570<\/li><li>vector(begin,end):\u590d\u5236[begin,end)\u533a\u95f4\u5185\u53e6\u4e00\u4e2a\u6570\u7ec4\u7684\u5143\u7d20\u5230vector\u4e2d<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u589e\u52a0\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>void push_back(const T&amp; x):\u5411\u91cf\u5c3e\u90e8\u589e\u52a0\u4e00\u4e2a\u5143\u7d20X<\/li><li>iterator insert(iterator it,const T&amp; x):\u5411\u91cf\u4e2d\u8fed\u4ee3\u5668\u6307\u5411\u5143\u7d20\u524d\u589e\u52a0\u4e00\u4e2a\u5143\u7d20x<\/li><li>iterator insert(iterator it,int n,const T&amp; x):\u5411\u91cf\u4e2d\u8fed\u4ee3\u5668\u6307\u5411\u5143\u7d20\u524d\u589e\u52a0n\u4e2a\u76f8\u540c\u7684\u5143\u7d20x<\/li><li>iterator insert(iterator it,const_iterator first,const_iterator last):\u5411\u91cf\u4e2d\u8fed\u4ee3\u5668\u6307\u5411\u5143\u7d20\u524d\u63d2\u5165\u53e6\u4e00\u4e2a\u76f8\u540c\u7c7b\u578b\u5411\u91cf\u7684[first,last)\u95f4\u7684\u6570\u636e<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u5220\u9664\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>iterator erase(iterator it):\u5220\u9664\u5411\u91cf\u4e2d\u8fed\u4ee3\u5668\u6307\u5411\u5143\u7d20<\/li><li>iterator erase(iterator first,iterator last):\u5220\u9664\u5411\u91cf\u4e2d[first,last)\u4e2d\u5143\u7d20<\/li><li>void pop_back():\u5220\u9664\u5411\u91cf\u4e2d\u6700\u540e\u4e00\u4e2a\u5143\u7d20<\/li><li>void clear():\u6e05\u7a7a\u5411\u91cf\u4e2d\u6240\u6709\u5143\u7d20<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4.\u904d\u5386\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>reference at(int pos):\u8fd4\u56depos\u4f4d\u7f6e\u5143\u7d20\u7684\u5f15\u7528<\/li><li>reference front():\u8fd4\u56de\u9996\u5143\u7d20\u7684\u5f15\u7528<\/li><li>reference back():\u8fd4\u56de\u5c3e\u5143\u7d20\u7684\u5f15\u7528<\/li><li>iterator begin():\u8fd4\u56de\u5411\u91cf\u5934\u6307\u9488\uff0c\u6307\u5411\u7b2c\u4e00\u4e2a\u5143\u7d20<\/li><li>iterator end():\u8fd4\u56de\u5411\u91cf\u5c3e\u6307\u9488\uff0c\u6307\u5411\u5411\u91cf\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u7684\u4e0b\u4e00\u4e2a\u4f4d\u7f6e<\/li><li>reverse_iterator rbegin():\u53cd\u5411\u8fed\u4ee3\u5668\uff0c\u6307\u5411\u6700\u540e\u4e00\u4e2a\u5143\u7d20<\/li><li>reverse_iterator rend():\u53cd\u5411\u8fed\u4ee3\u5668\uff0c\u6307\u5411\u7b2c\u4e00\u4e2a\u5143\u7d20\u4e4b\u524d\u7684\u4f4d\u7f6e<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5.\u5224\u65ad\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>bool empty() const:\u5224\u65ad\u5411\u91cf\u662f\u5426\u4e3a\u7a7a\uff0c\u82e5\u4e3a\u7a7a\uff0c\u5219\u5411\u91cf\u4e2d\u65e0\u5143\u7d20<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6.\u5927\u5c0f\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>int size() const:\u8fd4\u56de\u5411\u91cf\u4e2d\u5143\u7d20\u7684\u4e2a\u6570<\/li><li>int capacity() const:\u8fd4\u56de\u5f53\u524d\u5411\u91cf\u6240\u80fd\u5bb9\u7eb3\u7684\u6700\u5927\u5143\u7d20\u503c<\/li><li>int max_size() const:\u8fd4\u56de\u6700\u5927\u53ef\u5141\u8bb8\u7684vector\u5143\u7d20\u6570\u91cf\u503c<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">7.\u5176\u4ed6\u51fd\u6570<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>void swap(vector&amp;):\u4ea4\u6362\u4e24\u4e2a\u540c\u7c7b\u578b\u5411\u91cf\u7684\u6570\u636e<\/li><li>void assign(int n,const T&amp; x):\u8bbe\u7f6e\u5411\u91cf\u4e2d\u524dn\u4e2a\u5143\u7d20\u7684\u503c\u4e3ax<\/li><li>void assign(const_iterator first,const_iterator last):\u5411\u91cf\u4e2d[first,last)\u4e2d\u5143\u7d20\u8bbe\u7f6e\u6210\u5f53\u524d\u5411\u91cf\u5143\u7d20<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9a\u4e49\u4e8c\u7ef4vector\u7684\u4e24\u79cd\u65b9\u6cd5\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>int main()\n{\n    int N=5, M=6; \n    vector&lt;vector&lt;int&gt; &gt; obj(N); \/\/\u5b9a\u4e49\u4e8c\u7ef4\u52a8\u6001\u6570\u7ec4\u5927\u5c0f5\u884c \n    for(int i =0; i&lt; obj.size(); i++)\/\/\u52a8\u6001\u4e8c\u7ef4\u6570\u7ec4\u4e3a5\u884c6\u5217\uff0c\u503c\u5168\u4e3a0 \n    { \n        obj&#91;i].resize(M); \n    } \n \n    for(int i=0; i&lt; obj.size(); i++)\/\/\u8f93\u51fa\u4e8c\u7ef4\u52a8\u6001\u6570\u7ec4 \n    {\n        for(int j=0;j&lt;obj&#91;i].size();j++)\n        {\n            cout&lt;&lt;obj&#91;i]&#91;j]&lt;&lt;\" \";\n        }\n        cout&lt;&lt;\"\\n\";\n    }\n    return 0;\n}\nint main()\n{\n    int N=5, M=6; \n    vector&lt;vector&lt;int&gt; &gt; obj(N, vector&lt;int&gt;(M)); \/\/\u5b9a\u4e49\u4e8c\u7ef4\u52a8\u6001\u6570\u7ec45\u884c6\u5217 \n \n    for(int i=0; i&lt; obj.size(); i++)\/\/\u8f93\u51fa\u4e8c\u7ef4\u52a8\u6001\u6570\u7ec4 \n    {\n        for(int j=0;j&lt;obj&#91;i].size();j++)\n        {\n            cout&lt;&lt;obj&#91;i]&#91;j]&lt;&lt;\" \";\n        }\n        cout&lt;&lt;\"\\n\";\n    }\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u6765\u89e3\u8fd9\u9053leetcode\u7ec3\u4e60\u9898\uff0c\u867d\u7136\u96be\u5ea6\u662feasy\u4f46\u662f\u611f\u89c9\u5e76\u6ca1\u6709\u90a3\u4e48\u7b80\u5355\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u968f\u673a\u751f\u6210\u4e00\u4e2avector<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int main()\n{\n    srand((int)time(0));\n    vector&lt;int&gt; num;\n    int i1 = (rand() % 10);\n    for (int i = 0; i &lt;= i1; i++) {\n        int j1 = (rand() % 5);\n        for (int j = 0; j &lt;= j1; j++)\n            num.push_back(i);\n    }\n    for (int i = 0; i &lt; num.size(); i++)\n        cout &lt;&lt; num&#91;i] &lt;&lt; \" \";\n}<\/code><\/pre>\n\n\n\n<p> \u5982\u679c\u5199\u6210for (int i = 0; i &lt;= (rand() % 10) ; i++) \u597d\u4f3c\u4f1a\u51fa\u95ee\u9898\uff0c\u7591\u4f3c\u6bcf\u5faa\u73af\u4e00\u6b21\u4f1a\u91cd\u65b0\u751f\u6210\u4e00\u6b21\u968f\u673a\u6570\u3002<\/p>\n\n\n\n<p>\u6700\u7b80\u5355\u7684\u60f3\u6cd5\u5c31\u662f\u904d\u5386\u4e00\u904dnums\u6570\u7ec4\uff0c\u6bd4\u8f83nums[i+1]\u548cnums[i]\uff0c\u5982\u679c\u4e00\u6837\u5c31\u628anums[i+1\uff1a]\u4e00\u8d77\u5f80\u524d\u79fb\u4e00\u683c\u518ddrop\u6389\u961f\u5c3e\u5143\u7d20\uff0c\u95ee\u9898\u662f\u8fd9\u6837\u4e00\u6b21\u4e00\u6b21\u4fee\u6539\u6570\u7ec4\u4f1a\u6d6a\u8d39\u6548\u7387\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int removeDuplicates(vector&lt;int&gt;&amp; nums) {\n    for (int i=0;;) { \/\/i++\u6761\u4ef6\u9700\u8981\u5224\u65ad\uff0c\u8df3\u51fa\u5faa\u73af\u7684\u6761\u4ef6\u4e5f\u9700\u8981\u5224\u65ad\n        if (i == nums.size() - 1) break; \/\/\u5982\u679ci\u6307\u5411\u4e86vector\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u5219\u8df3\u51fa\n        if (nums&#91;i + 1] == nums&#91;i]){\/\/\u5982\u679ci\u540e\u4e00\u4e2a\u7684\u5143\u7d20\u4e0ei\u6307\u5411\u7684\u76f8\u540c\u5c31\u628a\u540e\u9762\u7684\u5143\u7d20\u5168\u90e8\u5f80\u524d\u79fb\u4e00\u4e2a\n            for (int j = i + 1; j &lt; nums.size()-1; j++) {\n                nums&#91;j] = nums&#91;j + 1];\n            }\n            nums.pop_back();\/\/\u5220\u9664\u672b\u5c3e\u5143\u7d20\n        }\n        else i++; \/\/\u540e\u4e00\u4e2a\u5143\u7d20\u4e0d\u540c\u65f6\u518di++\n    }\n    return nums.size();\n}<\/code><\/pre>\n\n\n\n<p>\u53bbleetcode\u4e0a\u70b9\u63d0\u4ea4\uff0c\u663e\u793a\u8d85\u65f6\uff0c\u5c5e\u5b9e\u5c34\u5c2c<\/p>\n\n\n\n<p>\u4e0a\u9762\u7684\u89e3\u6cd5\u663e\u7136\u5728\u6709\u591a\u4e2a\u76f8\u540c\u5143\u7d20\u65f6\u4f1a\u6d6a\u8d39\u6548\u7387\uff0c\u901a\u8fc7\u53cc\u6307\u9488\uff08\u5feb\u6162\u6307\u9488\uff09\u53ef\u4ee5\u51cf\u5c11\u79fb\u52a8\u5143\u7d20\u6b21\u6570\uff0c\u63d0\u9ad8\u6548\u7387<\/p>\n\n\n\n<p>\u5199\u53cc\u6307\u9488\u65f6\u53d1\u73b0\u6700\u540e\u4e00\u4e2a\u51fa\u73b0\u7684\u6570\u5b57\u662f\u5426\u91cd\u590d\u8981\u5206\u60c5\u51b5\u8ba8\u8bba\uff0c\u8fd8\u6ca1\u60f3\u5230\u4f18\u5316\u601d\u8def\uff0c\u6240\u4ee5\u4ee3\u7801\u5199\u7684\u81c3\u80bf\u4e86\uff0c\u90fd\u662f\u4e3a\u4e86\u5224\u65ad\u6700\u540e\u4e00\u6b21j\u6709\u6ca1\u6709\u8d8a\u754c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int double_ptr(vector&lt;int&gt;&amp; nums) {\n    int i = 0, j;\/\/i\u662f\u6162\u6307\u9488\uff0cj\u662f\u5feb\u6307\u9488\n    for (int i = 0;;i++) {\n        if (i == nums.size() - 1) break;\n        j = i + 1;\n        if (nums&#91;j] != nums&#91;i]) continue;\n        while (nums&#91;j] == nums&#91;i]) {\n            j++;\n            if (j == nums.size()) break;\n        }\n        int c = j - i - 1;\n        if (j &lt; nums.size()) {\n            for (j; j &lt; nums.size(); j++) {\n                nums&#91;j - c] = nums&#91;j];\n            }\n            for (j = 0; j &lt; c; j++) nums.pop_back();\n        }\n        else {\n            for (j = 0; j &lt; c; j++) nums.pop_back();\n            break;\n        }\n    }\n    return nums.size();\n}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u53cc\u6307\u9488\u5199\u5f97\u597d\u4e11\u964b\u3002\u3002\u3002<\/p>\n\n\n\n<p>\u63d0\u4ea4\u5b8c\u901f\u5ea6\u53ea\u6253\u8d25\u4e8610%\uff1f\uff1f\u6211\u89c9\u5f97\u867d\u7136\u4ee3\u7801\u4e11\u4e86\u4e00\u70b9\u4f46\u81f3\u5c11\u7b97\u6cd5\u6548\u7387\u5e94\u8be5\u6ca1\u95ee\u9898\u5427\u3002\u3002\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/leetcode\u4e0a\u7684\u9ed8\u8ba4\u7b54\u6848\nclass Solution {\npublic:\n    int removeDuplicates(vector&lt;int&gt;&amp; nums) {\n        int n = nums.size();\n        if (n == 0) {\n            return 0;\n        }\n        int fast = 1, slow = 1;\n        while (fast &lt; n) {\n            if (nums&#91;fast] != nums&#91;fast - 1]) {\n                nums&#91;slow] = nums&#91;fast];\n                ++slow;\n            }\n            ++fast;\n        }\n        return slow;\n    }\n};\n\n\u4f5c\u8005\uff1aLeetCode-Solution\n\u94fe\u63a5\uff1ahttps:\/\/leetcode-cn.com\/problems\/remove-duplicates-from-sorted-array\/solution\/shan-chu-pai-xu-shu-zu-zhong-de-zhong-fu-tudo\/\n\u6765\u6e90\uff1a\u529b\u6263\uff08LeetCode\uff09\n\u8457\u4f5c\u6743\u5f52\u4f5c\u8005\u6240\u6709\u3002\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u8054\u7cfb\u4f5c\u8005\u83b7\u5f97\u6388\u6743\uff0c\u975e\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u3002<\/code><\/pre>\n\n\n\n<p>\u770b\u4e86\u89e3\u6790\uff0c\u539f\u6765\u53ea\u8981\u8fd4\u56de\u957f\u5ea6\uff0c\u4e0d\u7528\u628a\u6570\u7ec4\u6539\u6210\u8981\u6c42\u7684\u5f62\u5f0f\u3002\u4e0d\u8fc7\u6211\u7684\u89e3\u6cd5\u786e\u5b9e\u6548\u7387\u4f4e\u4e86\uff0c\u5e94\u8be5\u6539\u5b8c\u6570\u7ec4\u518d\u628a\u540e\u9762\u7684\u4e00\u8d77pop\u6389\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"http:\/\/www.gislxz.com\/wp-content\/uploads\/2021\/11\/1.gif\" alt=\"\" class=\"wp-image-232\"\/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5leetcode26\u9898\u4e3a\u4f8b\u719f\u6089vector\u7ed3\u6784\u7684\u57fa\u672c\u7528\u6cd5<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12,6,5,11],"tags":[],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-leetcode","category-6","category-5","category-11"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":4,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":236,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/posts\/228\/revisions\/236"}],"wp:attachment":[{"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gislxz.com\/index.php\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}