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.
I think this way not bad but not good. Because if you use a.Count three time that is three time foreach. You should use one loop to count and use map method to return result that you need.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
I think this way not bad but not good. Because if you use a.Count three time that is three time foreach. You should use one loop to count and use map method to return result that you need.