Data file from one format to another.



Hi any and all;

I am having a heck of time getting my head around a
little problem I have run into; I got this question
during an interview recently and, well, failed
miserably. Now I am crazy to figure out the answer
since the answer seems like it would be easy, but
isn't (to me).

Lets say I have the following data in a text file;

A B C D E F G
A B C D E F H
A B C D E F I J
A B C D K L
A B C D M N
A B C D O P
A B C D Q R
A S T
A S U

I need to massage the data and print it out (to the
screen or file) as follows:

A
B C D
E F
G
H
I J
K L
M N
O P
Q R
S
T
U

I'm really at a loss for what to do. I've tried a
myriad of things (recursive calls to build a hash, to
build an array, to build a string) and basically I
could never fully get there .

What am I missing?
Thanks,
--fcs


.



Relevant Pages

  • Re: Data file from one format to another.
    ... I am having a heck of time getting my head around a ... during an interview recently and, well, failed ... I need to massage the data and print it out (to the ...
    (perl.beginners)
  • Re: Encase Forensic
    ... Rasheed analyses the mathematicss i.e., ... Jbilou kisss the vague building's tournament? ... it'll right explore the head. ... Some funerals revive, interview, and ...
    (sci.crypt)
  • Re: Deserts and Disharmony C&C please
    ... only flicker they buzz. ... interview once where behind the head of my interviewer the light kept ...
    (rec.arts.poems)
  • Re: Anyone planning to play Halo 2 for PC on May 8th?
    ... the game never really did it for me like it did for others. ... Heck, I used to be an obsessive Half-Life fan and I know people who considered Half-Life boring as bat shit. ... *I* looked at them, shook my head, smiled knowingly, and said "you simply don't understand". ...
    (comp.sys.ibm.pc.games.action)
  • Re: How to do this? A real writing question. Ooooh
    ... Miz Ultraviolet wrote: ... Jack scratched his his head and thought Now where the heck did I ... Does one quote conversations a character is having with himself? ...
    (misc.writing)