- This is a LLD question asked to me in CRED interview, the problem looks simple from outside.
- These are the params you would be judged on :
- Functional Correctness !
- Abstraction
- Proper Interface
- Extensibilty
- Clean Code, Principles : SOLID, DRY, KISS etc
- This repo gives a sample implementation that I did after thinking for sometime why I failed;
- I coded this up in python, which in itself was shitty choice, not strictly typed and people generally don't want to read it.
- There would be 2 dirs inside this,
- a python one, <this is what I wrote in 90 mins in interview scenario>
- a java one, <this is what I wrote in retrospect, after reading 2 chapters of Head First Design Patterns>
Outcomes :
- Read "Head First Design Patterns"; It actually makes sense to me now.
- Do and just not speak; atleast write code for 10 machine coding rounds; before you can solve the 11th one in a live coding environment.
- Learn the langauge, my java knowledge is hand-wavy; I write code till IDE thinks it makes sense, this is not how to be as a SWE.
- Learn what language has to offer, example know when to use a "abstract" class vs an "interface"
- Practice more you fool.