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.
For the test case, the first input given is exactly: "2 2"
Generalising, suppose the input is instead: "n m"
To access x and y separately, split can be used to separate the input into: "n" "m"
map is used to ensure "n" and "m" are integers. I hope this was clear!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Transpose and Flatten
You are viewing a single comment's thread. Return to all comments →
For the test case, the first input given is exactly: "2 2" Generalising, suppose the input is instead: "n m" To access x and y separately, split can be used to separate the input into: "n" "m" map is used to ensure "n" and "m" are integers. I hope this was clear!