If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Writing algorithms.

Suppose we have a file of n records which are partially sorted as x1 <= x2 <= x3 <= … <= xm, and xm+1 <= ….. <= xn, is it possible to sort the entire file in time O(n) using only a small fixed amount of additional storage?

Re: Writing algorithms.

So, first, if you have a new question, please create a new thread. It makes it easier for others to discover the discussion via search.

Second, we're happy to help you learn, but you need to show some degree of effort. If you have a specific question, show us what you have got so far and explain where you are stuck and we will try to help you learn, probably by providing a hint or a helpful link. You will, in general, not find people willing to solve your homework problems for you though.

Best Regards,

BioPhysEngrhttp://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.