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.
it's modern C++'s way of looping containers that can be iterated.
read it as forEACH element of type T in iterable_container_of_types_T
Many times found as 'for(auto it : container)'
In this example it is basically grabbing each letter of the word, substracting 97 ('a' ASCII value) to map it onto the array of letters with indexes [0-n] and checking if the height in that container's position is greater that the previously stored greatest letter size.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Designer PDF Viewer
You are viewing a single comment's thread. Return to all comments →
it's modern C++'s way of looping containers that can be iterated.
read it as forEACH element of type T in iterable_container_of_types_T
Many times found as 'for(auto it : container)'
In this example it is basically grabbing each letter of the word, substracting 97 ('a' ASCII value) to map it onto the array of letters with indexes [0-n] and checking if the height in that container's position is greater that the previously stored greatest letter size.