Question: The interview started with machine learning fundamentals, specifically regarding the fluctuation of Lr (learning rate) and gradient vanishing in fully connected networks.
Round 2: Coding
Question: I had to implement the round() function from scratch, with a string as input. Then, I was asked to round a given string s according to a string p.
Details
Technical Interview Details
Machine Learning Fundamentals
The interviewer asked about when the learning rate (Lr) would fluctuate the most (large vs. small values).
I was also asked about where gradient vanishing is more likely to occur in a fully connected network (near the input or output).
Coding Questions
Implement round() from scratch (input is string):
I was expected to handle various edge cases, which the interviewer kept bringing up after my initial implementation.
Edge cases included float() overflow, '-.2', and '2.'.
Round given string s according to p:
Example 1: s = '12567', p = '100', expected return '12600'.
Example 2: s = '1234.678', p = '0.1', expected return '1234.7'.
Preparation Tips & Key Takeaways
What I Learned
It's crucial to clarify edge cases upfront, especially for string manipulation problems.
Machine learning fundamentals are still important for internship interviews.
Recommended Preparation
Coding Practice
Focus on string manipulation and edge case handling.
Practice implementing common functions from scratch.
Common Pitfalls to Avoid
Not asking about edge cases at the beginning can lead to multiple rounds of debugging during the interview.