Microsoft Interview Question: Given a list of integers l an... | Glassdoor.ie

Interview Question

Software Engineer Interview Cambridge, MA (US)

Given a list of integers l and an int k, find all

  continuous sequences in l that sum to k.
Answer

Interview Answer

1 Answer

0

Brute force approach is to iterate each number then subsequent numbers to see if it sums to k: O(N^2) approach. But there is an O(N) solution that is on LeetCode (exact problem)

Interview Candidate on 13 Jun 2019

Add Answers or Comments

To comment on this, Sign In or Sign Up.