#!process anyone get loan offer c1 tech q
1 messages ยท Page 1 of 1 (latest)
it was one of the tech questions
it was like storing monthly balances & calculating a credit score to see which loan offer to provide right?
yeah, but i got stuck on calculating age of accounts
like say input of dates is 01102012 03042013 โฆ i might be a dumbass but if it was all same year it would be easy to calculate it
across multiple years was a bit more tricky and i didnt have much time
cus first u gotta find the oldest account and then compare to the current account
thats how i woulda done it but im sure theres an easier way
she also wouldnt tell me if age was in days months or yrs
me
my guy said it was only the months that there was a balance item for not the newest - oldest
split it and make it a list, and then index to find each part of the string, like [:2] would be day, it would be kinda messey with alot of if statements but it would find the oldest and newest
yeah but then youd also have to calculate the age tho no?
like doable but def did not have enough time so im assuming there was supposed to be an easier way
yea and i think loan is the hardest one
cashback and fraud r much easier
one of the things u had to calculate was account age, but interviewer wasnt being too clear on how to do so, she just kept saying something like we know that each month has a balance like ik that already ๐ญ
yeah cashback and fraud i literally had memorized lmao
its wtv i think my case and behav went good so lets see
how precise were they asking the account age to be, was it like down to the day like, account is 1 year 2 months and 3 days old ๐ญ
was not specified
did you ask them?
yea they purposefully leave out information so that you have to ask for it
yeah i was planning on asking but im p sure it was likely gonna be total months
technically the data set does go over multiple years tho
and each dataset was for one single customer
so would prolly have to do some weird math if ur tryna get total months from like jan 2012 to april 2015
damn, multi customers?!? the other questions were for a single customer
nah its single customer, but their balances and payments span across multiple years
i was using MMYYYY for the key in my dict
since there was no ID
ah i see, and im guessing they asked how would you scale it to multi customers?
yeah most likely
do yk if they look at which q they gave u when reviewing
or is it just an overall performance thing
cus ts was buns
i think its overall, case and tech r on a scale from 1 to 10, behave, is pass or fail
dw u got other processes too, so ur chilling
thats only if there is a key for every MMYYY, there could be some months where there were no transtions
you think this would work?
you get each key (MMYYYY) as a tuple like (YYYY,MM) in a list, find the min and max of that list representing oldest and newest months, then calculate it using math
like (newest[0] - oldest[0]) * 12 + (newest[1] - oldest[1])
this looks good, you just need to have enough time to be able to code all that up because you also need to find the oldest date first
which isnt hard but like others said a heap would be one way to do it
why not do this
min_date = min(date_array)
max_date = max(date_array)
Python compares tuples element-wise. For (YYYY, MM), it first compares the year (YYYY). If years are equal, it compares the month (MM). This aligns with chronological ordering: (2022, 12) < (2023, 5) < (2023, 8) < (2024, 1).
ah yeah that would, for me though i used my dates as keys, and never made a new structure for it so i wasnt able to come up with it
i only had around 10 mins left when i got to that par
part
๐ญ yea 10 mins is crazy
forgot u could just do min max lmao
honestly that was probably one of the most important parts of the code im prolly cooked for not getting it
No we dont want average monthly balance, just total age of that account, so that we can use that in the calculation for the credit score. We do however need things like total balance and current balance as well but those are fairly straightforward to get
best way to do it now that i think of it is store all dates in a different hashmap, find min of those dates using min(dates) or something like that, then take the current date and subtract it from the oldest date to get age of accounts
yes we dont really merge the data
yeah i think in python u could do something like for _, date in dates.items(): minDate = min(curDate, date)
and age is likely in months although i did not ask since i didnt get to that
did the interviewer help you, like work with you on the problem
she helped me throughout but on this part imo she was not being clear but tbh i shouldve been able to figure it out
thing that confused me the most was that the date range can span over a year
so iwas like how do u get age from 01202005 to 04022007 for example
the math for it isnt too bad
just couldnt come up with it
someone here said it earlier
(newest[0] - oldest[0]) * 12 + (newest[1] - oldest[1])
i only had like 10 mins left so i didnt have the time to do it
much harder than fraud or the other variants imo
nah since we were running out of time she just asked to explain the rest of my implementatoin for part 3 without code
and we just finished there
so p bad tech for me
behavioral was really easy, case went well too
if i had finished my tech id be confident
yeah
finished vcns in like 40 mins
yeah unlucky
T/T/T/T/F is the order of the configuration for vcns right?
there was lots of info for fraud and cashback but 0 info for loan offers
wasnt even expecting that question
my friend took it with me today as well, he got cashback but he said his case was cooked
someone ik who did it yesterday got VCN for case, loans for technical
how did they do on loans
solid
damn im cooked lol
did he say the same thing for age of accounts like similar solution
didnt ask him about loans, asked him more about vcn
i think it was current remaining balance vs initial balance actually
something like that
ok so ig they r giving one ez case and hard tech or one ez tech and hard case
yeah vcns is light asf
i got survey on aug 14th but my interviewer took a month to scheudle my interview
damn mine took 1 day
yea it be like that
ppl were saying u only need 2/3 but i dont think my tech was good enough to pass tbh
for the behavoiral did they ask let me about yourself
nah
or y u wanna join c1
nah
yeah finished in 20 mins
did they ask the status qouo question
tech imo
also do yall know if they only require 2/3 or do u need like decent on all
from past reddit posts
this person did well on tech and behave
ok on case
for vcn did you use nested dict or tuple?
sure!
i also have my own doc too ๐ญ
๐
neither u dont really write any code for it
oh yea mb, i meant loan
nested dict but tuple for dates would be helpful
@peak cave for the loan offers, are u supposed to map (YYYY, MM) to the balance of that month, and also at the same time keep a running balance or smth? what did u mean by current vs total balance.
yeah use yyyy mm as key for ur map
balance iirc should be updated in that key, so like u should map yyyy, mm to amount, and amount updates based on the sum of amount paid and initial balance
current balance would be like ur current remaining, and i think i meant to say initial balance, so initial balance is what u started out with before any payments
yep makes sense, and then u just feed into the equation to get some number and use if statements to find the best loan offer right?
yeah thats right
@peak cave what was ur case interview?
were in the same boat, good behave and case, not so good tech ๐ญ
i had vcn and fraud
chocked on q4 for fraud
ye
no thats q3
q4 is multi client
they asked me to implement it
ye
loop once to find avg, loop again to compare
wtf there r 4 questions?? i got loan offer and only got to q3 the best offer and then he asked if i had any questions for him
Loan could only have 3 questions
Same. But i feel vcn validation part might be changed since i got 2 invalid and 3 valid and first one was invalid
When was ur interview I got 4 t and 1 f
i got 4t1f too, oct1 case
Did you get vcn?
yes
Oct 1
damn