• + 1 comment
        public static int designerPdfViewer(List<int> h, string word)
        {
            var maxHeight = 1;
            foreach(var c in word) {
                var alphabetIndex = GetAlphabetIndex(c);
                var characterHeight = h[alphabetIndex];
                
                if(characterHeight > maxHeight) {
                    maxHeight = characterHeight;
                }
            }
            
            return maxHeight * word.Length;        
        }
        
        public static int GetAlphabetIndex(char character)
        {
            character = char.ToUpper(character); // Convert to uppercase for consistency
    
            return character - 'A'; // 'A' becomes 0, 'B' becomes 1, etc.
        }