You are viewing a single comment's thread. Return to all comments →
Here is my Python solution! We find the maximum height of the letters in the word, and multiply that by the length of the word.
def designerPdfViewer(h, word): height = -1 for letter in word: height = max(height, h[ord(letter) - 97]) return height * len(word)
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 →
Here is my Python solution! We find the maximum height of the letters in the word, and multiply that by the length of the word.