小白1d
小白1d
全部文章
题解
剑指offer(1)
归档
标签
去牛客网
登录
/
注册
小白1d的博客
全部文章
/ 题解
(共13篇)
题解 | #移动控制#
function bind() { const con = document.getElementById('jsContainer') const rows = con.querySelectorAll('tr') const cols = rows[0].querySel...
2021-07-21
9
689
题解 | #设置标签#
var tagInput = { isInited: false, init: init, bindEvent: bindEvent, addTag: addTag, removeTag: removeTag }; tagInput.init(); func...
2021-07-21
4
668
题解 | #简易计算器#
var Calculator = { init: function () { var that = this; if (!that.isInited) { that.isInited = true; // 保存操...
2021-07-21
0
566
题解 | #选择组件#
function CheckGroup(renderTo, options, isMultiple) { var that = this; that.renderTo = renderTo; that.options...
2021-07-21
5
654
题解 | #从尾到头打印链表#
/*function ListNode(x){ this.val = x; this.next = null; }*/ function pri...
2021-07-18
0
448
题解 | #文字输出#
function output(str) { var strArr = str.split('') //3 var blinkEl = document.getElementById('jsBlink') var children = ...
2021-07-18
1
646
题解 | #智能提示#
function suggest(items) { let value = document.querySelector('.js-input').value.trim() const sDom = document.querySelector('.js-sugges...
2021-07-18
1
632
题解 | #检查重复字符串#
function containsRepeatingLetter(str) { const matches = str.match(/[a-zA-Z]{1}/g) return matches.length !== Array.from(new Set(matches)).lengt...
2021-07-17
2
641
题解 | #使用闭包#
function makeClosures(arr, fn) { const result = [] for(var i = 0,len = arr.length;i< len;i++){ result[i] = (function(v){ ...
2021-07-17
0
490
题解 | #移除数组中的元素#
删除数组中元素 要反向循环,因为splice删除操作会移动数组下标 function removeWithoutCopy(arr, item) { let len = arr.length while(len--){ if(arr[len] === item ){ ...
2021-07-17
0
449
首页
上一页
1
2
下一页
末页