1

Over the last days, there were at least three questions about the same problem:

Maxima counting

Number of contiguous subarrays in which element of array is max

Frequency of each element of an array considering all contiguos subarrays

None of the previous answers seemed correct to me (given the constraint of finding an algorithm better than O(n^2)). I wrote my answer in one of the duplicates. Should I post the same answer in the other questions? Should two of them be marked as duplicate? Which ones?

3
  • If they're all three asking the same question, then two should be closed as duplicates. The general guideline there is the best question with the best answers should be the main question, and the rest closed as duplicate.
    – Kendra
    Aug 11, 2015 at 16:41
  • @gnat I'm still not sure, because the first link is about two identical questions by the same user and the second is about two questions far distant of each other in time. And still, I have no clear winner on which is better as one has a better explanation of the problem, but the other shows a valid effort to solve the question.
    – Juan Lopes
    Aug 11, 2015 at 16:54
  • yeah, second question looks like a closer duplicate. I picked first one solely because of top voted answer which lays out pretty universal logic: "answer the question which is likely to be most understandable, most useful to future readers, etc..." Over there, accept for a lowers score (and frankly inferior:) answer is solely because it picked detail which turned out more important for asker
    – gnat
    Aug 11, 2015 at 17:01

0

Browse other questions tagged .