Problem 29 - Sort with Indexes

Back to General discussions forum

BlaineThePain     2015-09-11 10:45:42

First of all, I wanted to say hi to everybody since this is my first post here and I'm fairly new to programming (about three weeks) and to the site in general (about three days), but I'm finding this very interesting and challenging.

I had a very minor problem while submitting my solution to problem 29: the text said that the answer should contain "initial indexes of the array members disturbed by sorting", so I thought that if an array member wasn't disturbed (i.e. it was in the right position since the beginning) i shouldn't have posted its original location. Evidently this approach was wrong and the true request was to print the original location of every element, even if it hadn't changed.

Fixing my solution was very easy (just had to comment out two lines of code) but I was wondering whether I misinterpreted the text (after an array is sorted every memeber is considered to be perturbed) or it was the text not being 100% clear. I'm asking because this all is a fairly new thing to me and I'm trying to grasp the terminology correctly.

Cheers, and happy solving.

Rodion (admin)     2015-09-11 10:57:02
User avatar

Hi! Thank you for pointing out this vaguety!

> whether I misinterpreted the text ... or it was the text not being 100% clear

Regretfully, many problem statements there still have poor wording and may mislead the participants. As I look at the phrase in question after your explanations, I also think it is misguiding. I'll try to rewrite it right now!

Mazedul Akbar     2016-01-26 13:08:41
User avatar

I will try then i say how to solve it

Please login and solve 5 problems to be able to post at forum