Class MaxPairWiseProduct2
java.lang.Object
topics.introduction.MaxPairWiseProduct2
Computes the max pairwise product among different numbers
E.g.: 7 3 6 => 42
However, in this example we will only work with two long numbers
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcompute()The problem with the previous version is: Maximum JAVA int value: 2_147_483_647 Expected result: 100_000_000_000 If we work with long, the maximum JAVA long value: 9_223_372_036_854_775_807
-
Constructor Details
-
MaxPairWiseProduct2
public MaxPairWiseProduct2()
-
-
Method Details
-
compute
public long compute()The problem with the previous version is: Maximum JAVA int value: 2_147_483_647 Expected result: 100_000_000_000 If we work with long, the maximum JAVA long value: 9_223_372_036_854_775_807- Returns:
-