LeetCode | Squares of a Sorted Array 🔢
🔹 Approaches:
• Two Pointers (Optimal)
• Square + Sort
🔹 Time Complexity: O(n) optimal / O(n log n) sorting
🔹 Space Complexity: O(n)
Daily DSA practice to improve logic and consistency 🚀
“We compare absolute values from both ends to build the sorted squares efficiently.”
#LeetCode #DSA #Arrays #TwoPointers #Python #CodingJourney #LearningInPublic