I have a java file and I need to make a function efficient. The code i have is complete. Its 10-15 lines. Just need to make it efficient. The question the program solves is :
Read the input one line at a time and output the current line if and only if you have already read at least 1000 lines greater than the current line and at least 1000 lines less than the current line. (Again, greater than and less than are with respect to the ordering defined by [login to view URL]().)
My current solution passes all the test, but needs to be more efficient.
Using java and its collection frameworks
I have one more similar question.
I will pay $5 each. Thanjs
My speciality is optimizing inefficient code. I have studied algorithms and datastructures both in general math and in the specific context of computer science. All I need is to see your code and tests and know by precisely what degree you need a speedup and I should be able to get faster code back to you within a few days. I should also be able to answer your other question, though I will need to know what it is first!
Sincerely,
Josef Thorne.