Combinations

Combinations of space delimitered strings from text file

Page 1 of 1

2 Replies - 636 Views - Last Post: 25 August 2009 - 10:47 PM Rate Topic: -----

#1 wulfgarpro  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-August 09

Combinations

Post icon  Posted 25 August 2009 - 09:36 PM

Dear All,

I have a text file. This text file is made up of numbers seperated by spaces.

1 2 3
1 2
1 1
1 2 3 4

Im trying to create an ArrayList (or List<string>) of all the different combinations found within this text file.

Regards.
Is This A Good Question/Topic? 0
  • +

Replies To: Combinations

#2 prankster  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 67
  • Joined: 31-July 09

Re: Combinations

Posted 25 August 2009 - 09:44 PM

Can you allow the same string of numbers more then once, ex:

1 1 2
4 3 5
1 1 2
3 4

as you can see 1 1 2 is in there twice, should it be in the arrayList twice?

This post has been edited by prankster: 25 August 2009 - 10:14 PM

Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1632
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Combinations

Posted 25 August 2009 - 10:47 PM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1