My Credit Karma Interview Experience: A Deep Dive into the Technical Round
Overview
This document details a candidate's experience during a technical interview for a software engineering role at Credit Karma. The interview process was structured to evaluate the candidate's technical abilities, problem-solving methodologies, and communication effectiveness. The technical round involved a practical coding problem designed to simulate on-the-job challenges.
Interview Rounds
The interview process commenced with an initial screening by a recruiter, followed by a technical round. The technical assessment was conducted virtually using a collaborative coding environment. The interviewer maintained a supportive and encouraging demeanor throughout the session.
The Problem
The candidate was presented with a problem involving comparing two sets of user accounts—one from the current month and one from the previous month. Each account was defined with the following attributes:
balance(decimal number)name(string)accountType(e.g., credit card, checking, savings)openedDate(timestamp)
The task required the candidate to identify and report changes between the two sets of accounts, specifically:
- Accounts present in both months, displaying the balance change.
- Accounts present only in the current month, indicating they were added.
- Accounts present only in the previous month, indicating they were deleted.
Example input:
// previous:
// {
// "balance": 2000.0,
// "name": "Chase Freedom",
// "accountType": "credit_card",
// "openedDate": 1111680799
// },
// {
// "balance": 100.0,
// "name": "Citibank",
// "accountType": "credit_card",
// "openedDate": 1000680799
// }
// ]
// current:
// {
// "balance": 1000.0,
// "name": "Chase Freedom",
// "accountType": "credit_card",
// "openedDate": 1111680799
// },
// {
// "balance": 500.0,
// "name": "American Express",
// "accountType": "credit_card",
// "openedDate": 1222680799
// }
// ]
// Expected output:
// Chase Freedom: -1000
// American Express: added
// Citibank: deleted
The Solution
The candidate provided a TypeScript solution, leveraging Maps for efficient comparison of account sets. The solution iterates through the previous and current account sets, identifying changes and logging the appropriate messages.
type Account = {
balance: number;
name: string;
accountType: string;
openedDate: number;
};
function compareAccounts(previous: Account[], current: Account[]): void {
const prevMap = new Map<string, Account>();
const currMap = new Map<string, Account>();
previous.forEach((account) => {
prevMap.set(account.name, account);
});
current.forEach((account) => {
currMap.set(account.name, account);
});
// Check for updated or deleted accounts
for (const [name, prevAcc] of prevMap) {
if (currMap.has(name)) {
const currAcc = currMap.get(name)!;
const balanceChange = currAcc.balance - prevAcc.balance;
console.log(`${name}: ${balanceChange}`);
} else {
console.log(`${name}: deleted`);
}
}
// Check for added accounts
for (const [name] of currMap) {
if (!prevMap.has(name)) {
console.log(`${name}: added`);
}
}
}
// Example usage
const previous: Account[] = [
{
balance: 2000.0,
name: "Chase Freedom",
accountType: "credit_card",
openedDate: 1111680799,
},
{
balance: 100.0,
name: "Citibank",
accountType: "credit_card",
openedDate: 1000680799,
},
];
const current: Account[] = [
{
balance: 1000.0,
name: "Chase Freedom",
accountType: "credit_card",
openedDate: 1111680799,
},
{
balance: 500.0,
name: "American Express",
accountType: "credit_card",
openedDate: 1222680799,
},
];
compareAccounts(previous, current);
Approach
The candidate initiated the problem-solving process by clarifying requirements and restating the problem. Possible solutions were discussed, weighing the advantages and disadvantages of each. The candidate emphasized writing clean, modular code while clearly articulating the logic throughout the coding process. The interviewer posed follow-up questions related to optimization and edge-case handling.
Key Takeaways
- Communication: Clearly articulating the thought process is paramount.
- Edge Cases: Considering and discussing edge cases demonstrates thoroughness.
- Iteration: Refining solutions through iterative improvements is encouraged.
- Calmness: Maintaining composure allows for effective problem-solving.
Original Source
This experience was originally published on medium. Support the author by visiting the original post.
Read on medium