Return an array of all the distinct quadruplets [nums[a], nums[b], nums[c], nums[d]] from an array nums of n integers in the following way: A, B, C, and D are distinct if 0 = a, b, c, and d. target = nums[a] + nums[b] + nums[c] + nums[d].
Return an array of all the distinct quadruplets [nums[a], nums[b], nums[c], nums[d]] from an array nums of n integers in the following way: A, B, C, and D are distinct if 0 = a, b, c, and d. target = nums[a] + nums[b] + nums[c] + nums[d].
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: easy
标签: interviewbit, qualcomm, company-specific
目标公司: Qualcomm
参考答案摘要
You can give the response in any sequence. Example 1: Input: nums = [1,0,-1,0,-2,2], target = 0 Output: [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]] Example 2: Input: nums = [2,2,2,2,2], target = 8 Output: [[2...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。