Implement Naive Bayes classifier from scratch | Pinterest Interview Question