Lloyds Banking Group Interview Question: One question was a 'count all... | Glassdoor.co.in

Interview Question

Data Scientist Interview London, England (UK)

One question was a 'count all the pairs of elements from

  the array that sum to ... ' style question.

Interview Answer

1 Answer


The naive approach that will pass some test cases but not all is to iterate through all pairs, checking each. Then there is a hashing method which it's worth familiarising yourself with that will pass all the test cases.

Interview Candidate on 14-Jan-2020

Add Answers or Comments

To comment on this, Sign In or Sign Up.