Reputation
51,239
Next tag badge:
99/100 score
22/20 answers
Badges
3 78 180
Newest
 Enlightened
Impact
~1.0m people reached

Jun
24
comment Is external merge sort a divide-and-conquer algorithm?
I think you are overinterpreting this. Since Merge sort is already described as a D&C algorithm, I think those books do not bother to mention that "External Merge Sort" is also D&C, because its pretty obvious. And when they discuss External Merge Sort, the focus is typically on having an example for an external sort algorithm, mentioning it is still D&C would be completely insignificant in that context.
Jun
24
comment Is external merge sort a divide-and-conquer algorithm?
"that External Merge Sort is not considered D&C algorithms in most books"? Which books? I doubt that, maybe its just a misconception of yours? I guess "most books" describe Merge sort as a D&C algorithm, so its implicitly clear that "External Merge Sort" belongs also to that category.
Jun
24
revised Simple and clean way of comparing three numbers
deleted 53 characters in body
Jun
24
revised How safe is it to compile a piece of source code from a random stranger?
added 41 characters in body
Jun
24
comment How safe is it to compile a piece of source code from a random stranger?
@Christian: obviously. But I guess the OP would not invest any time into the review of an applicant's code if the latter did not come up with at least a plausible appearance concerning his job request. And also a stranger does probably not want to be sued. My point is: each of the above points on its own may be circumvented, but all together? That is a pretty low risk.
Jun
23
revised How safe is it to compile a piece of source code from a random stranger?
deleted 6 characters in body
Jun
23
awarded  Nice Answer
Jun
23
revised How safe is it to compile a piece of source code from a random stranger?
added 58 characters in body
Jun
23
revised How safe is it to compile a piece of source code from a random stranger?
added 219 characters in body
Jun
23
answered How safe is it to compile a piece of source code from a random stranger?
Jun
23
comment How safe is it to compile a piece of source code from a random stranger?
@FlorianMargaine: the question of the OP is: is that really necessary?
Jun
23
comment Simple and clean way of comparing three numbers
... and note that the original 8 lines can be replaced by a simple one-liner return result[FindStrictMaxIndex(val,3)]; at the point in code where the original 8 lines were placed. The other parts, especially FindStrictMaxIndex itself are completely separated from the "business logic", which moves them out of the focus of changing business requirements.
Jun
23
comment Simple and clean way of comparing three numbers
@gnasher729: it depends on how many "duplicates" in the orginal code are, how similar they really are, and how often the FindStrictMaxIndex function can be reused. For one or just two times of reusage, this won't pay off, of course, but that is what I wrote already in my answer. Note also the other advantages I mentioned above concerning future changes.
Jun
23
revised Simple and clean way of comparing three numbers
added 33 characters in body
Jun
23
comment Simple and clean way of comparing three numbers
+1, now it is indeed an improvement over the OPs original code.
Jun
23
awarded  c
Jun
22
revised Drawing concentric circles without gaps
syntax highlighting improved
Jun
22
revised Drawing concentric circles without gaps
added 1109 characters in body
Jun
22
awarded  Nice Answer
Jun
22
revised Drawing concentric circles without gaps
example added