We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi, I am getting stuck in the way the test cases are built.
I storing the size of R as Nr and and a counterR as a class property (setting it via the MapReduce constructor) and incrementing it for every call to the reduce function.
//initial value
counterR = 0;
SizeOfNr = 10;
My problem is:
for the first test case with 10 values, it works fine.
But for the second test case with 20 values, it fails.
Can you help me point where I am going wrong.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Relational MapReduce Patterns #3 - Difference
You are viewing a single comment's thread. Return to all comments →
Hi, I am getting stuck in the way the test cases are built.
I storing the size of R as Nr and and a counterR as a class property (setting it via the MapReduce constructor) and incrementing it for every call to the reduce function. //initial value counterR = 0; SizeOfNr = 10;
//Reduce function counterR++; if(value.size() == 1 && counterR < sizeOfNr) { //emit() }
My problem is: for the first test case with 10 values, it works fine. But for the second test case with 20 values, it fails. Can you help me point where I am going wrong.