Examples of TwoSumCounterHashSetImpl


Examples of com.nailgun.study.algo.counter.TwoSumCounterHashSetImpl

  }
 
  public static void main(String[] args) {
    IntListExtractor extractor = new IntListExtractorFileImpl();
    List<Integer> ints = extractor.extract();
    TwoSumCounter counter = new TwoSumCounterHashSetImpl(ints);
    int result = 0;
    for (Integer t: RANGE){
      if (counter.count(t) > 0) {
        result++;
        System.out.println("Matches for: " + t);
      }
    }
    System.out.println("Result: " + result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.