Rahul Sharma
Rahul's Blog

Rahul's Blog


Data Structures & Algorithms

Articles in this series

1. Two Pair Sum

Jul 17, 20211 min read

Find all the pairs of two integers in an unsorted array that sum up to a given S #include <iostream> #include <vector> #include <unordered_set> using namespace std; vector<int> pairSum(vector<int> arr, int S) { unordered_set<int> s; vector<i...