How to transpose a small file with text spread over multiple lines in java?
for ex: From:
ab ch as asd lk
ere lk oi qw
weq aa q uro ppp lkj
To:
ab ere weq
ch lk aa
as oi q
asd qw uro
lk - ppp
- - lkj
assuming a - for missing items, for ex: (5,2) place
I have recently started with java and wanted to know what would be the
best way to manage such transpose conversion in java? Should I use an
Arraylist of arraylist, keeping in mind varying length of each line?
I have seen some of the existing questions on in-situ transposition, but,
as I will be working on small files, if someone could help me with an
easier to understand and implement solution, that would be really helpful.
No comments:
Post a Comment