Hi all! I have an upcoming Apple interview round, for which I have been asked to interview in C language. I have been working in C at work, so I wouldn’t mind. But there are some questions which require DS which I am comfortable with in Java but not in C[Example: Hashsets] .
Did anyone have any similar experiences?
Since you're being asked to interview in C, you don't a choice to switch to a new language (this is rare, but does happen for interview loops on teams that only care about 1 language).
Spend some time sharpening your C muscles, but I have two thoughts that can hopefully relieve some of your stress:
In Java, here's the syntax I'd use for the Hashset. I forget the exact syntax in C, but I'll assume some library exists for this so I can make progress on the core problem. If you'd like me to come back and flesh that portion out in more detail, let me know.
Alex talks about Programming Language Selection in his course as well.
I have heard that Apple in particular will require certain languages for interviews often. Since you have been asked to interview in C, you should definitely do everything in C. As Rahul mentioned, you should leverage the interviewer to sidestep boilerplate DSA coding - There isn't much signal on them having you create the HashSet data structure from scratch.
I talk about this all more in-depth in this lesson of my DSA course: https://www.jointaro.com/course/master-the-data-structures-and-algorithms-interview/missing-what-matters/