package leetcode;

/**
 * https://leetcode.com/problems/product-of-the-last-k-numbers/
 */
public class Problem1352 {
    static class ProductOfNumbers {
        public ProductOfNumbers() {
        }

        public void add(int num) {
            // TODO
        }

        public int getProduct(int k) {
            // TODO
            return 0;
        }
    }

    public static void main(String[] args) {
    }
}

@@ -399,20 +399,856 @@
 g%5B%5D args) %7B%0A
+        ProductOfNumbers productOfNumbers = new ProductOfNumbers();%0A        productOfNumbers.add(3); // %5B3%5D%0A        productOfNumbers.add(0); // %5B3,0%5D%0A        productOfNumbers.add(2); // %5B3,0,2%5D%0A        productOfNumbers.add(5); // %5B3,0,2,5%5D%0A        productOfNumbers.add(4); // %5B3,0,2,5,4%5D%0A        System.out.println(productOfNumbers.getProduct(2)); // return 20. The product of the last 2 numbers is 5 * 4 = 20%0A        System.out.println(productOfNumbers.getProduct(3)); // return 40. The product of the last 3 numbers is 2 * 5 * 4 = 40%0A        System.out.println(productOfNumbers.getProduct(4)); // return 0. The product of the last 4 numbers is 0 * 2 * 5 * 4 = 0%0A        productOfNumbers.add(8); // %5B3,0,2,5,4,8%5D%0A        System.out.println(productOfNumbers.getProduct(2)); // return 32. The product of the last 2 numbers is 4 * 8 = 32%0A
     %7D%0A%7D%0A

Update problem 1352