MAY17 Challenge: MAXMEDIAN problem Clarification

Case #2: If we permute array A in this way: 1 4 5 6 2 3

So array B: 4 6 3

So median becomes 6.

What am I missing?

To find median, you first sort the numbers in either asc or desc order and then select the middle number.

4 6 3 will be written as 3 4 6. So median would be 4.

2 Likes

I am not exactly sure that requesting clarification of problem statement from other user (on discuss or elsewhere) is allowed or not.

Anyways, please try to post on-going contest related queries as comments on contest page. If @admin feels that your question is violating the rules (eg- no discussion abut any problem of an on-going contest) he can take action against you ( reduced ratings or suspension from discuss or both).

Basically, i want to say is take care. Its best to stick to safer side. :slight_smile:

Missed the sorting, although I took HackerRank’s Statistics course, pathetic.

@vijju123

I believe you understand that it didn’t reveal any algorithm for the problem.

And I tried the Comments section in the problem (you may check). Probably the problem setters are too occupied in other works to answer.

1 Like

“I believe you understand that it didn’t reveal any algorithm for the problem.”

I know. Thats why i said i am not exactly sure.

"Probably the problem setters are too occupied in other works to answer.

My point is, usually if you see any contest, they ban requesting for sample test cases, or giving answers like “For this test case the expected output is this.”

No doubt people still do that, and admins show some leniency in this case. But still, as i said, better to be safe. Thats all! :slight_smile:

1 Like

@abdullah768 this is half the solution you shouldn’t have stated that to him. :expressionless: and please refrain from answering questions related to ongoing contest. I too had the same doubt but little thinking resolves it.

Sorry, I thought it was basic stuff about medians :!

1 Like

Thats why i said, these things shouldnt be discussed on discuss forums.

@abdullah768 Yeah, it was like telling an array index starts with 0.

@neilit1992 No offense, but how the definition of median was half the solution? The principal part of the problem was to figure out a possible permutation, anyone could see the median.

@theintel okay no problem, anyway please refrain from asking questions related to ongoing contest, post in comment section, @admin ll be able to provide a better explanation always because they wrote the question we are just trying to solve according to what intuitively seems correct.

1 Like

@neilit1992 Asked them, administrators are too busy to answer. So there was no way to be clarified except asking in the discussions. Hopefully admin checks the comments section more frequently. :slight_smile:

The concern raised by @theintel is correct. If admins dont answer in comments, then there will be threads in discuss and fairness would get compromised. My query had been over 30 hours and no answer (I got Q after 5-6 reading more, was able to get AC, but point is, they SHOULD reply)