Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 977. Squares of a Sorted Array
Given a non-decreasing integer array (which may contain negatives), return the squares of each number in non-decreasing order; the core challenge is to produce this in O(n) time by leveraging the input order (e.g., merging largest squares from both ends) instead of re-sorting.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.