Interview Q&A / Machine Learning
Machine Learning interview questions
Supervised vs unsupervised learning, overfitting, metrics and the classic models, explained simply.
Prefer rapid revision? Practise Machine Learning short interview answers →
- When should you use a generic instead of a union type for a function parameter?
Use a generic when the output type must follow the input type, such as returning the same kind you received. Use a union when the function accepts several kinds and the result does not depend on which one it was.
IntermediateQuick answer1 min read