Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 354 Bytes

Quad_Combination.md

File metadata and controls

7 lines (4 loc) · 354 Bytes

#Quad Combination

Given an array of numbers arr and a number S, find 4 different numbers in arr that sum up to S.

Write a function that gets arr and S and returns an array with 4 indices of such numbers in arr, or null if no such combination exists.

Explain and code the most efficient solution possible, and analyze its runtime and space complexity.