{"componentChunkName":"component---src-templates-blog-post-js","path":"/blog/2020-06-07-algorithm/","result":{"data":{"markdownRemark":{"id":"50da77cb-5319-594e-9355-0814ed8ea332","html":"<h1>数据结构</h1>\n<h2>算法复杂度</h2>\n<p>算法执行需要多时间/空间。</p>\n<p>时间复杂度/空间复杂度。</p>\n<h3>Big-O 表示法</h3>\n<p>表示一个算法在最坏的情况下的计算复杂度。</p>\n<ul>\n<li>Constant: O(1)</li>\n<li>Logarithmic: O(log(n)), 底数据为 2</li>\n<li>Linear: O(n)</li>\n<li>Linearithmic: O(nlog(n))</li>\n<li>Quadratic: O(n^2)</li>\n<li>Cubic: O(n^3)</li>\n<li>Exponential: O(b^n), b > 1</li>\n<li>Facorial: O(n!)</li>\n</ul>\n<h2>数组</h2>\n<h3>静态数组</h3>\n<h3>动态数组</h3>\n<p>创建新的静态数组，容量为原数组的 2 倍。将原数组内容拷贝过</p>","frontmatter":{"date":"June 09, 2020","title":"数据结构和算法","description":"","tags":["Data Struture","数据结构"]}}},"pageContext":{"id":"50da77cb-5319-594e-9355-0814ed8ea332"}}}