Given an array representing the heights of people, determine how many people are visible to the last person in the array.
Rule: Person A is visible to Person B if there is no one between them who is taller than both Person A and Person B.
Example:
[1, 10, 5, 7, 6, 3, 2, 4]5 (The people with heights 2, 3, 6, 7, and 10 are visible to 4)Follow-up:
Find the number of visible people for every person in the list (not just the last one).
Goal: Implement an optimized solution with time complexity for both cases.
How would you optimize a website across the following three layers(Frontend, Backend, Database)?
Explain the process of what happens from the moment a user types a URL into the browser until the page is fully rendered.
Compare and contrast Server-Side Rendering (SSR) vs. Client-Side Rendering (CSR).
You are given an array that is a mixture of True and False values.
True.False.arr[i] == True and arr[i+1] == False.Goal: Implement an optimized solution (Binary Search) with time complexity.