Class MaxPairWiseProduct2

java.lang.Object
topics.introduction.MaxPairWiseProduct2

public class MaxPairWiseProduct2 extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: