Search Your Question...!

Showing posts with label Designer PDF Viewer Python Solution. Show all posts
Showing posts with label Designer PDF Viewer Python Solution. Show all posts

Designer PDF Viewer | Python Solution | HackerRank

 When a contiguous block of text is selected in a PDF viewer, the selection is highlighted with a blue rectangle. In this PDF viewer, each word is highlighted independently. For example:

PDF-highighting.png

There is a list of  character heights aligned by index to their letters. For example, 'a' is at index  and 'z' is at index . There will also be a string. Using the letter heights given, determine the area of the rectangle highlight in  assuming all letters are  wide.