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.
Great code. I have a small suggestion. There is no need to convert the String to a character array to iterate over it. You can alternatively loop through it like this by using s.charAt(i)
Two Characters
You are viewing a single comment's thread. Return to all comments →
Great code. I have a small suggestion. There is no need to convert the String to a character array to iterate over it. You can alternatively loop through it like this by using s.charAt(i)
HackerRank solutions.