Guardian Analytics Interview Question: Given an array of integers, f... | Glassdoor.co.in

Interview Question

Data Scientist Interview Mountain View, CA (US)

Given an array of integers, find the maximum cumulative sum

  of a sub-set of the array
Answer

Interview Answer

1 Answer

0

Wrote the answer in one line of R code. The interviewer did not know R so we did the problem in a lower level language. Got follow up questions about big-oh, then worked on optimizing the algorithm. It was a little over the top as it was clear he did not know how to optimize it below an n^2 cost but knew there was a way.

Interview Candidate on 04-Nov-2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.