I’m struggling to think how to go about this. Could you point me in the right direction incase it’s something I’ve never seen before. I have tried google first, but I don’t think the questions raised online match exactly.
Am I supposed to be using recursion here? I’m really faltering on this one.
By the way, thanks for your speedy help today. I start a programming course on Monday and you’ve been a great aid
I want to check if an item (in my case the number 11) is present within both the outer array and each nested array within it. It should only return false if at least one array does NOT have the specified item.
Also, to recurse you must progressively make the problem set smaller. As this is an array of arrays problem set, I think you have to be careful with how the problem gets smaller.
all I can do from here is suggest ideas for you (that may move you forward, ideally).
So you know that calling the function with [] should give false.
Why don’t you start there.
Then on a piece of paper, try to figure out some psuedocode that you believe will work. You can share the pseudocode for feedback first before coding…
Pppffft. Feeling completely downbeaten on this one. Can’t bare to look at it anymore.
Will just have to give it a miss if I can’t get an answer from anywhere. Hopefully someone can help me out on here with a solution, because it’s not for a lack of trying.