Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Design a tooltip with an arrow that dynamically changes position based on hover location.

Hard

Problem Statement

Design a tooltip with an arrow that dynamically changes position based on hover location.

Sample Output

The tooltip appears above, below, left, or right of the button based on the hover position.

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

<!DOCTYPE html> <html> <head> <style> /* Add CSS here to style the dynamic tooltip */ </style> </head> <body> <div class="tooltip-container"> <button class="tooltip-button">Hover Me</button> <div class="tooltip">Tooltip Text</div> </div> </body> </html>

Document

To view the HTML changes, please type the code within the editor