04 2021 档案
摘要:子串(定义):字符串中任意个连续的字符组成的子序列称为该串的子串。 /** * 通过for循环判断A是否为B的子串 * @param {String} comp - 被对比的字符串(B) * @returns {Boolean} */ String.prototype.isSubStrOf = fu
阅读全文
摘要:1. flexbox .parent { display: flex; justify-content: center; align-items: center; width: xxxpx; height: xxxpx; } .child { width: xxxpx; height: xxxpx;
阅读全文
摘要:function MinStack() { this.stack = []; this.helperStack = []; this.len = 0; this.helperLen = 0; } MinStack.prototype.push = function(v) { this.stack.p
阅读全文
摘要:Array.prototype._reverse = function() { const len = this.length; const mid = Math.floor(len / 2); // l: left pointer; r: right pointer; let l = 0, r =
阅读全文