NOTHING

Jul 13, 2019 at 9:51am
NOTHING HERE :P

Last edited on Jul 13, 2019 at 10:40am
Jul 13, 2019 at 9:56am
I am not able to optimize this code for large n. ...
What should I do??
Jul 13, 2019 at 10:04am
Hello minimum,

You made an attempt for code tags, but HTML style tags do not work.


PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code.

Along with the proper indenting it makes it easier to read your code and also easier to respond to your post.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.

I found the second link to be the most help.



<bits/stdc++.h> is not a standard C++ header file and it makes it difficult to compile or run the program with a file that most people do not have.

I do not mean to be rude and do not take this the wrong way, but optimizate is not a proper word and I am not sure what yo are looking for.

Along with the proper code tags and indenting a fwe blank lines would help to make the code easier to read.

Hope that helps,

Andy
Jul 13, 2019 at 10:06am
no here by optmizing I mean that ... I have to reduce time complexity of the code and what should I do for that
Jul 13, 2019 at 10:10am
Throw the code away, and think of a better ALGORITHM.

Your code, as it stands is like a bubble sort. Quick, dirty, but hopeless with large data sets.
https://en.wikipedia.org/wiki/Sorting_algorithm

You need to THINK much smarter about the problem.

You won't get there by tinkering with the code you have.

Jul 13, 2019 at 10:16am
would you please optimize my code
Jul 13, 2019 at 10:29am
You haven't told us what it's supposed to do.

You've presented us with a model-t ford.

There's no point making it go as fast as a ferrari only for you to turn round later and say it needs wings.

And no, we're not here to fix whatever half-baked idea you come up with just for you to earn brownie points in some competition.
Jul 13, 2019 at 11:01am
With an attitude like that nothing is what you will get in abundance.

Reporting the one person trying to help you is the wrong approach. You may not have liked salem c's answers, but his point was to try and get you to think about some different in how the program could work.

Andy
Jul 13, 2019 at 11:26am
It looks like the code was optimised by deleting it.
At least it runs in zero time now - can't get more efficient than that.

Jul 13, 2019 at 4:14pm
Open your eyes, people.
@minimum is obviously a troll.
Couldn't be more obvious.

Anyway, in future if someone responds to this type of question, they should start (or end) their post with a copy of the question. That way it can't be deleted.
Last edited on Jul 13, 2019 at 4:15pm
Jul 13, 2019 at 8:02pm
That way it can't be deleted.
Can't we just use our superior programmer powers and 1.2.3. Sorted?
Topic archived. No new replies allowed.