Re: moving data from one place to another in a text file

From: Robert Wagner (spamblocker-robert_at_wagner.net)
Date: 02/25/05


Date: Fri, 25 Feb 2005 02:04:03 GMT

On 24 Feb 2005 10:24:50 -0800, "Richard" <riplin@Azonic.co.nz> wrote:

>> A general version of the problem would call for
>> moving m lines, where m can be zero thru the file size (n)
>
>'Zero' and 'file size' means no lines moved. In fact the maximum of
>this specific type of problem is 'half the file'.

When output order is the reverse of input order, the number of lines
moved is n - 1. When records are shuffled like a deck of cards, the
number moved is n (unless you're planning to 'deal bottoms').

>> An example is sorting the file.
>
>The general solution to 'sorting the file' is sorting.

Sorting is a special case of Reordering Objects. The fastest way to
reorder objects in an ordered collection is to exchange pointers, as
opposed to physically moving the objects.



Relevant Pages

  • Re: Questions (Space)
    ... and visualize something moving exactly that speed. ... With other things, I look at either more time, or more distance (or more ... driving speeds. ... Zero point sounds like a cool term for in a sci-fi ...
    (rec.arts.sf.composition)
  • Re: Cut a point into two - topological?
    ... so you can't split the point into two non-empty sets. ... It has zero width, ... to each other, and a,,space" where they are moving. ... leave a,, trace", which can be regarded with static geometry, if it is ...
    (sci.math)
  • Re: Photons
    ... field and a magnetic field that oscillate at right angles to each ... But SR says that in any system moving at the speed of light all ... But what do you mean by a clock? ... And a light clock with zero frequency...is stopped. ...
    (sci.physics.relativity)
  • Re: Recognise filter in macro and ignore.
    ... If you are moving data to a new worksheet for printing, ... before moving it, and skip those records that you do not want to print. ... "malycom" wrote in message ... some of the values may be zero. ...
    (microsoft.public.excel.programming)
  • Re: do not allow rows broken
    ... the other columns and then just let them move those single cells with all ... > They aren't actually sorting the data. ... So instead of moving the entire row ... >> Vaya con Dios, ...
    (microsoft.public.excel.worksheet.functions)