Array problem ? sorted or not? sorting might make things simpler and don't forget HashMap
Here is my solution code: https://github.com/JSerZANP/leetCode_...
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.