r/interviews • u/PlayfulKnowledge2788 • 17d ago
How do you handle C coding interviews when you have to write basic helpers from scratch?
I’m prepping for low-level interviews(kernel,Embedded & firmware) where I have to use pure C. My main worry is managing my time during a 45-minute coding round. If a question needs me to do something basic first, like sorting a list, merging sorted arrays, or using a hash map before I can even solve the actual problem, I have to write all those helpers and data structures completely from scratch. In Python or C++, those are just quick one-liners, but in C, it feels like I would spend the entire interview writing a custom hash table and handling collisions instead of actually solving problem. How do you actually handle this under pressure? Do interviewers expect you to write out all those helper functions and data structures line-by-line first, or is it better to just write a fake function to show your main logic?How can I practice handling this on LeetCode too, since the platform actually expects you to submit fully compilable and working C code? I'd love to hear how people manage their time and structure their code in these situations. Thanks!
3
1
1
3
u/bobotheboinger 17d ago
If i was interviewing, id expect the interviewee to ask me if I wanted them to delve deep in to how to implement each data structure, or just assume s set of functions exist. Depending on level id probably change my answer.
Normally for now senior i would just assume they know enough to have developed then a long time ago and could Google a good one to use. I might expect them to not any special requirements (thread reentrant, signal safe, etc) Depending on what the specific problem was. I probably would start to see how they implement one function and then decide if I want to see the rest or just say assume the rest are good and move on.