05 2021 档案
摘要:题目描述: 找出两个数组中的中位数 解答: mounted() { let result = this.findCenterNum([1, 9], [4, 7]) console.log(result); }, methods: { findCenterNum(arr1, arr2) { let a
阅读全文
摘要:题目描述: 找出一串字符串中不含重复字母的最长字串 解答: mounted() { let result = this.findLongestString("afahdkjuhaivs") console.log("result = " + result); }, methods: { /* * 使
阅读全文
摘要:题目描述: 给定两个非空数组[1, 2, 3] [4, 5, 6] 将两个数组中的数倒序组合成一个数字并相加 321+654=975 返回数组[5, 7, 9] 代码实现(Vue脚手架环境) mounted() { let res = this.add([1, 2, 3], [4, 5, 6]) c
阅读全文
摘要:题目描述: 输入一串数组nums,找到数组中和为target的两个值的下标并返回 vue脚手架实现: mounted() { let a = this.getSum([1, 3, 4, 44, 5], 8) let b = this.getSums([1, 3, 4, 44, 5], 4) cons
阅读全文

浙公网安备 33010602011771号