05 2021 档案

摘要:题目描述: 找出两个数组中的中位数 解答: mounted() { let result = this.findCenterNum([1, 9], [4, 7]) console.log(result); }, methods: { findCenterNum(arr1, arr2) { let a 阅读全文
posted @ 2021-05-18 17:37 栗子米 阅读(56) 评论(0) 推荐(0)
摘要:题目描述: 找出一串字符串中不含重复字母的最长字串 解答: mounted() { let result = this.findLongestString("afahdkjuhaivs") console.log("result = " + result); }, methods: { /* * 使 阅读全文
posted @ 2021-05-18 13:45 栗子米 阅读(68) 评论(0) 推荐(0)
摘要:题目描述: 给定两个非空数组[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 阅读全文
posted @ 2021-05-10 15:22 栗子米 阅读(75) 评论(0) 推荐(0)
摘要:题目描述: 输入一串数组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 阅读全文
posted @ 2021-05-07 22:27 栗子米 阅读(78) 评论(0) 推荐(0)