Amazon Interview Question

DSA Problem: Focused on Binary Search + Prefix Sum, with optimal solution via Segment Tree. I gave a brute-force O(N) first, then tried optimizing (Binary Search in O(log N)) — implemented ~50%. Couldn’t finish fully due to time constraints. LPs (Leadership Principles): Took 40+ minutes. Very important. Interviewer asked to structure responses using STAR and go deep into past experiences.