Bloomberg Phone Screen for Sr. SWE

Anonymous User
1135
Jun 12, 2021

Credit Card Fraud Detection

Given a logs file which has following data: name, spent amount, location, time

Input:
John, 30, DC, 5:00
Bob, 250, Boston, 11:00
Julie, 1100, NY, 3:00
Bob, 50, NY, 11:58
John, 12, DC, 5:30

Outut:
Bob, 250, Boston, 11:00
Julie, 1100, NY, 3:00
Bob, 50, NY, 11:05

Explaination: 1) Spent amoutn over 1000 will trigger the system; 2) Transaction in less or equal to 1 hour will trigger the system.

Anyone can provide solution or reference on LC for this?

Comments (1)