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.
There's also no need to store the array 'a'. We can just read a number from stdin, XOR it, and continue the loop. How might you do this in Java 8? Is there a standard way to convert System.in into a stream of the next N integers?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
There's also no need to store the array 'a'. We can just read a number from stdin, XOR it, and continue the loop. How might you do this in Java 8? Is there a standard way to convert System.in into a stream of the next N integers?