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.
That's what I'm trying to say, I'm looking at the code and twoRobots is not being called for each test input, it's being called once regardless of how many test inputs there are. The value of m is basically being ignored here, aside from being passed into the twoRobots function, it's supposed to run twice here because t == 2 for two test cases, but it's only reading and testing the first case.
I'm trying to fix it here by adding another loop somewhere around here, I'm just wondering if this is a glitch with the java version or I'm not understanding something.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Two Robots
You are viewing a single comment's thread. Return to all comments →
That's what I'm trying to say, I'm looking at the code and twoRobots is not being called for each test input, it's being called once regardless of how many test inputs there are. The value of m is basically being ignored here, aside from being passed into the twoRobots function, it's supposed to run twice here because t == 2 for two test cases, but it's only reading and testing the first case.
I'm trying to fix it here by adding another loop somewhere around here, I'm just wondering if this is a glitch with the java version or I'm not understanding something.