Developer Interview Questions

269,373 developer interview questions shared by candidates

Given an array that contains numbers and/or other nested arrays, write an algorithm to come up with a sum of these elements, multiplied by the depth (or how many arrays deep) you are. For example, what would you do with an input array that looks like: [ 2, 3, [ 9, [ 1, 2 ]], 4]
avatar

IOS Developer

Interviewed at Meta

3.5
Oct 19, 2017

Given an array that contains numbers and/or other nested arrays, write an algorithm to come up with a sum of these elements, multiplied by the depth (or how many arrays deep) you are. For example, what would you do with an input array that looks like: [ 2, 3, [ 9, [ 1, 2 ]], 4]

Viewing 2511 - 2520 interview questions

Glassdoor has 269,373 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.