Question
My problem: Can you help me design an algorithm? The time complexity of this algorithm will be O(n^2). Introduction: At frist, we have array Q[1:n],
My problem: Can you help me design an algorithm? The time complexity of this algorithm will be O(n^2).
Introduction: At frist, we have array Q[1:n], W[1:n], E[1:n]. The three arrays are all made up of positive integers. I need to find if there are numbers in Q and W whose multiplication belongs to E.
Those two examples will help you better understand my goal:
1. If Q = [4, 5, 6], W = [6, 7, 8] and E = [1, 24, 2] --- we will get the answer yes. --- Q[1] * W[1] = E[2]
2. If Q = [99, 100, 78], W = [6, 7, 8] and E = [1, 2, 3] --- we will get the answer no'
Recommend: you do not need give me real code. Procedure code and clear explanation thats all I need.
I will give upvote for timely and correct answer. Thank you!!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started