no one knows?
I am not an expert on maths or algorithms at all but I am a software developer.
What exactly is a Linear algorithm?
I was given a problem where we have 2 inputs and we need to produce a result set.
so we have 2 arrays. an input and index array.
the result must contain the product of the input array NOT including the current item index in the index array.
does this make sense?
so an input array could be 1 2 3 4 and the index array can be 2 0 4 3
so for the first index item, it is 2
this means that we should calculate 1, 2, and 4 from the input array.
thats all well but when they mention "linear" - what do they mean?
hmmm. ok so i flunked that test That sucks
so how would you do this in terms of logic?
you have 2 inputs.
you need to calculate the product of input 1. but you do not include the item in the first input which is the position referenced in input 2's array?
what kind of formula would that be?