Using Two-Pointer Technique to Optimize Algorithm Solutions
Published in
3 min readSep 26, 2020
When dealing with strings and arrays in the context of algorithm challenges, our first instinct usually revolves around built-in methods.
Let’s take a look at this seemingly easy problem:
/* Description:
Given a sorted (ascending) array of integers,
write a function that returns a sorted (ascending) array
which contains the square of…