4 ms·
I remember being asked how I'd go about implementing quicksort in a phone interview. My response was: I wouldn't. Sorting is a solved problem that's available
by hermitdev 8y ago
I remember being asked how I'd go about implementing quicksort in a phone interview. My response was: I wouldn't. Sorting is a solved problem that's available in pretty much any language's standard library (every non assembly language I've used, at least). The interviewer chuckled and something to the effect of "good answer, then can you describe the algorithm to me?", to which I said sure, and did.
Thankfully, I went through college before these automated plagiarism detectors had caught on. They were around, but not as pervasive as today. I mean, if you're going to sort a vector in C++ for a trivial app, there's only so many ways to write:
std::vector<int> stuff{...};
std::sort(std::begin(stuff), std::end(stuff));
And, lets face it: most lab assignments requiring a student to write a program are pretty small and trivial (at least mine were 20 years ago). The projects, on the other hand, were definitely more involved and you'd likely see more divergence in solutions there.