C3.ai Interview Question: given a number, find out if t... | Glassdoor

Interview Question

Solutions Engineer Interview

given a number, find out if two prime numbers will add up

  to equal the target number.

Interview Answer

2 Answers


have a helper function which finds all prime numbers leading up to the target, store it in a hash table and array, and iterate through the array. See if the Target - array element exists in the hash table.

Interview Candidate on Jul 25, 2017

What do you mean by previously written code?

Anonymous on Jul 27, 2017

Add Answers or Comments

To comment on this, Sign In or Sign Up.