C
CJM
I have a bit of code which involves some looping...
In each iteration, we retrieve a string value... I want to build a list of
DISTINCT (in the SQL sense) string values.
Our example strings might be 'ABCD', 'ABCDXX', 'ABCDYY', 'ABCDZZ', 'ABCD',
'ABCDYY'
In which case, we want to end up with 'ABCD', 'ABCDXX', 'ABCDYY', 'ABCDZZ'
It's as simple as that.... I'm not bothered what structures we use...
It is easy to build a solution using loads of nested loops, but it seems a
bit inefficient, so I'm wanting to see if there some good suggestions from
the floor...
Thanks in advance
Chris
In each iteration, we retrieve a string value... I want to build a list of
DISTINCT (in the SQL sense) string values.
Our example strings might be 'ABCD', 'ABCDXX', 'ABCDYY', 'ABCDZZ', 'ABCD',
'ABCDYY'
In which case, we want to end up with 'ABCD', 'ABCDXX', 'ABCDYY', 'ABCDZZ'
It's as simple as that.... I'm not bothered what structures we use...
It is easy to build a solution using loads of nested loops, but it seems a
bit inefficient, so I'm wanting to see if there some good suggestions from
the floor...
Thanks in advance
Chris