Panda Guru LogoPanda
Guru

Capital One Interview (Full Virtual onsite) for Technical Lead Software Engineer

Round 1

Questions: Your task is to implement a simplified version of a banking system.

Initially, the banking system does not contain any accounts, so implement operations to allow accounts creation as well as making deposits.

Operations:

CREATE_ACCOUNT

Should create a new account with the given identifier if it doesn't already exist. Returns "true" if an account was successfully created, Returns "false" if an account with accountId already exists.

DEPOSIT

Should deposit the given amount of money to the specified account accountId Returns the total amount of money in the account after the query has been processed. If the specified account doesn’t exist, it should return -1.

TRANSFER

This should transfer the given amount of money from account with fromId to account with toId.

Returns the balance of fromId if the transfer was successful, or -1 otherwise. Returns -1 if fromId or toId doesn’t exist. Returns -1 if fromId and toId are the same. Returns -1 if funds on the account fromId are insufficient to perform the transfer.

TOP_ACTIVITY

This should return the identifiers of n most active accounts in descending order of financial activity indicator. In case of a tie, sorted alphabetically by accountId in ascending order.

The returned value should be an array of identifiers in the format <accountId_1>(<activity_indicator_1>), <accountId_2>(<activity_indicator_2>), ..., <accountId_n>(<activity_indicator_n>)

Financial activity indicator is defined as the sum of all transactions for an account including the money deposited and/or successfully transferred. Unsuccessful transactions are not included.

If less than n accounts exist in the system, then return all their identifiers (in the described format).

operations = [ ["CREATE_ACCOUNT", "account1"], # true ["CREATE_ACCOUNT", "account1"], # false ["CREATE_ACCOUNT", "account2"], # true ["DEPOSIT", "non-existing", "2700"], # -1 ["DEPOSIT", "account1", "2700"], # 2700 ["TRANSFER", "account1", "account2", "2701"], # -1 ["TRANSFER", "account1", "account2", "200"], # 2500 ["TRANSFER", "account1", "account2", "2500"], # 0 ["DEPOSIT", "account2", "300"], #3000 ["CREATE_ACCOUNT", "account3"], # true ["DEPOSIT", "account3", "4000"], #4000 ["TOP_ACTIVITY", "3"], #[account1(5400), account3(4000), account2(3000)] ["DEPOSIT", "account2", "1000"], # 4000 ["TOP_ACTIVITY", "2"], #[account1(5400), account2(4000)] ["TOP_ACTIVITY", "5"] #[account1(5400), account2(4000), account3(4000)] ]
Candidate's Approach

The candidate implemented a BankingSystem class with methods for creating accounts, depositing money, transferring funds, and retrieving the top active accounts. The approach involved using dictionaries to store account balances and financial activity, ensuring efficient operations.

Interviewer's Feedback

No feedback provided.


Round 2

Questions: Design a credit card account management application. The application should represent a bank with the opportunity to apply for credit cards, manage credit cards, manage payments, and report usages.

Features that need to be supported:

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 3

Questions: The interviewer asked management-related questions, mistakenly thinking the candidate was interviewing for a managerial position.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 4

Questions: Asked about the quick replying model "Eeno" and suggestions for improvement.

Then asked to tweak the following code:

import calendar import time class RetrieverQ: def __init__(self, store): self.store = store def retrieve_recent(self, customer_id, curr_time): result = [] # Retrieve data for the last 5 minutes including the current minute for index in range(0, 5): val = self.store.retrieve(customer_id, curr_time - 5 + index) if val is not None: result.append(val) return result

Questions Asked:

Candidate's Approach

The candidate explained the code and provided the output for the given parameters. They modified the retrieve_recent function to accept a time window parameter, allowing for dynamic retrieval of recent activities.

def retrieve_recent(self, customer_id, curr_time, time_window): result = [] for index in range(time_window): # Use time_window directly in the loop val = self.store.retrieve(customer_id, curr_time - time_window + index + 1) if val is not None: result.append(val) return result
Interviewer's Feedback

No feedback provided.