It is for anyone trying to read it. I don't mean to be rude but you will be more successful in getting help for your problems if you make it as easy to understand as possible. And apart from that it is just good programming practice to make your code easy to read.
It means the program run time was too great. A more efficient algorithm must be used.
I'm guessing it's because of the bubble sort (and a particularly inefficient version of it), which isn't really needed, although Softrixs solution relies on the array being sorted.
If I write the code for you, then the contest is a test of my skills, not yours.
Hi Again to All
Softrix he have an Question and now we should help him to slove it, if we dont do that, i think we never can tell anyone he/she can start learning cpp from this forums... .
so, lets help.
i think, my code give response in less than one secound... but i think we can make it better.
lets use Quick sort and use it inline and delete temparry.
Oh! i forgot to delete the arrays in the end of code!
before writing program again with Quick Sort, please check what will happen if you delete arrays at end and dont use temparray(i didnt use it in my code but i define it).
after that please let us know what happen.
TNX