CreditKarma Interview Question for Staff Engineers

Country: United States
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
of 0 vote

I'm a bit confused as to whether you start with the campaign stats and have to find people, or if you start with people and have to find the campaign that's right for them.

If it's the former, you could use an if block to establish a new array of people that are suitable for the email, or email them as they are deemed suitable.

If you're looking for campaigns by the person's qualities, you could first establish which campaigns they could qualify for (ie if one calls for a credit score higher than 500 and another campaign requires 550 and the person can fit both, they both go in the array) and then compare them until you limit it down to campaigns with the same qualifications or until you limit it down to one campaign.

- Jo June 05, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote

Assuming we need to design a system (like a controller) to send most relevant emails to available repository of users, given the repository of camps. In other words, this controller system has access to both these repositories.

There are two entities here 'User' and 'Campaign'.

Brute-force approach - Take every attribute from each user object and try to match with (entry criteria) of each camp. If matched thats the best ad for email, if doesn't remove one attribute from matching list and check for remaining. Continue this for all 100k users.
Ex- User has 'Gender', 'city', 'credit score range' .

Implementation logic - Maintain 3 arrays (of size 100k each and initialized to zero). Index of array represents user identity. A hashMap, with key as camp Id and value as these 3 arrays.

for user1( array[0] basically) see if criteria is met. If yes, mark 1). Do this for all users. Once entire Map is populated, its easy to get() based on Camp Id as key, all those array indicies where 'value=1'. If for a given user all indicies are 1, thats the best camp. If not, look for two matches etc.

2. Improvisation - As a prereq, 'group' the campaigns (by city, by gender etc). This will limit the number of camps to look for (for every user). May be users can also be grouped, so that within a group, if a campaign is applicable for one user, most likely its going to be aplicable to rest of the group as well (sometimes atleast further improvization).
Note - Data structures, implemenation logic can remain same.

- rsumankumar July 10, 2017 | Flag Reply

Add a Comment

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.


is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More


CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More