package
0.0.0-20241209140624-9fce2a725d55
Repository: https://github.com/elven9/my-leetcode.git
Documentation: pkg.go.dev

# README

Squares of a Sorted Array

Solution IdxTime ComplexitySpace ComplexityComment
1O(nlogn)O(n)Scan, square, and sort. Naive solution
2O(n)O(n)Two pointer solution
3O(n)O(n)Two pointer, but with both pointers start from 0 and len(nums)