1β£- Many good answers that, even being a working solution, weren't the fastest ones.
That's ok, but of course an interviewer might follow up asking you: Can you make it faster?
Tip: would a better data structure help you?
2β£- A working solution is better than no solution!
Sometimes we want to optimize the code but usually you only have 1 hour to finish! Be smart, have a solution and explain how you'd make it perfect
With practice, your good solutions will become the perfect solution by default!
Which programming language do I need to know to start with Machine Learning?
π π€π§
[1 quickβ‘οΈ min]
1/5π§΅
The easy answer is: If you know how to code well, that's all you need to start learning ML!
TensorFlow for example enables you to use ML in many languages like C++, Java, Kotlin, Swift, Objective C, JavaScript, Go, Julia, Scala, Ruby, C# and many others
Butβ¦π
2/5π§΅
The more realistic answer: Pythonπ
Most of the ML samples, tutorials and content in general you'll see is written in Python
Understanding the basics of the language will definitely make your life MUCH easier