I have basic programming skills in both Visual Basic and C/C++.
My problem is to create an an Array such that its indexes is its contents (and how to access the contents) or any other method that can solve my problem.
Example:
Assume I have the following numbers 1,2,3,4,5 and combine then into three. the Array should have
1,2,3
1,2,4
1,2,5
1,3,4
1,3,5
1,4,5
2,3,4
2,3,5
2,4,5
3,4,5
as it's contents and same index such then whenever I want to search for a three number combination, I should use index instead of looping the whole array.
e.g if I want to know if {1,3,4},{1,3,5} and {3,4,5} is in the Array I should move direct to the line.
I hope I'm clear.
Basically I do not want to use looping technique to search for an entry in an array.
Thanks
Kanya649
My problem is to create an an Array such that its indexes is its contents (and how to access the contents) or any other method that can solve my problem.
Example:
Assume I have the following numbers 1,2,3,4,5 and combine then into three. the Array should have
1,2,3
1,2,4
1,2,5
1,3,4
1,3,5
1,4,5
2,3,4
2,3,5
2,4,5
3,4,5
as it's contents and same index such then whenever I want to search for a three number combination, I should use index instead of looping the whole array.
e.g if I want to know if {1,3,4},{1,3,5} and {3,4,5} is in the Array I should move direct to the line.
I hope I'm clear.
Basically I do not want to use looping technique to search for an entry in an array.
Thanks
Kanya649