...

/

Challenge 3: Find Two Numbers that Add Up to Given Value

Challenge 3: Find Two Numbers that Add Up to Given Value

Given an array and a number "value", find two numbers from an array that sum to "value".

Problem statement

Implement a function find_sum(arr: &[i32], value: i32), which takes an array arr, a number value, and returns an array of two numbers that add up to value. In case there is more than one ...

Access this course and 1400+ top-rated courses and projects.