Given an array of integers and an integer target. Write a brute force algorithm that return true if there are two numbers in that array that sums to target. If there are no pair of numbers that sum to target, return false. Show the time complexity of the algorithm.

icon
Related questions
Question

Given an array of integers and an integer target. Write a brute force algorithm that return true if there are two numbers in that array that sums to target. If there are no pair of numbers that sum to target, return false. Show the time complexity of the algorithm.

Given an array of integers and an integer target. Write a brute force algorithm
that return true if there are two numbers in that array that sums to target. If there
are no pair of numbers that sum to target, return false. Show the time complexity
of the algorithm.
Transcribed Image Text:Given an array of integers and an integer target. Write a brute force algorithm that return true if there are two numbers in that array that sums to target. If there are no pair of numbers that sum to target, return false. Show the time complexity of the algorithm.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer