ThreeSum Methods |
The ThreeSum type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Count |
Returns the number of triples (i, j, k) with i < j < k such that a[i] + a[j] + a[k] == 0. |
![]() ![]() | MainTest |
Reads in a sequence of integers from a file, specified as a command-line argument;
counts the number of triples sum to exactly zero; prints out the time to perform
the computation. |
![]() ![]() | PrintAll |
Prints to standard output the (i, j, k) with i < j < k such that
a[i] + a[j] + a[k] == 0. |