4 ms·
The problem is, it isn't at all unlikely that a quicksort implementation created entirely independently w/o plagiarizing will match an implementation somewhere
by zrobotics 8y ago
The problem is, it isn't at all unlikely that a quicksort implementation created entirely independently w/o plagiarizing will match an implementation somewhere online. When I took algorithms, I would normally do the assignment and compare my implementation with online sources, mostly to compare against. Aside from variable names, ~80% of those assignments matched one of the first few SO answers. I think the real fail here is a company assigning something like quicksort and expecting to get original answers.
- msla 8y ago> The problem is, it isn't at all unlikely that a quicksort implementation created entirely independently w/o plagiarizing will match an implementation somewhere online. It's practically guaranteed. Quicksort is quicksort. You can't get creative with it without implementing something which isn't quicksort anymore. That code may well sort a list, but if the assignment is to implement quicksort, you've failed at the task. > I think the real fail here is a company assigning something like quicksort and expecting to get original answers. Right. You have to go to IOCCC levels of perversity to be able to turn in something which is quicksort but isn't going to trip a well-trained plagiarism detector.
- hermitdev 8y agoI 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.