Is This Sum Possible?
Goal
Our goal in this chapter is to introduce basic algorithms related to sorting and searching through a given problem and example of solution pathways.
Problem Constraints
The array can contain positive and negative integers
The array can contain duplicate values
The index of the two operands cannot be equal
Solution Ideas
Determine if the difference between an integer from the array and the target value exists
Programming Concepts -> Searching for a value
Two Pointer Solution
This solution optimizes the previous solution by taking advantage of the dataset being sorted.
Programming Concepts
Basic Sorting Algorithm
Using Two Pointers
Connected Readings
Last updated