--> back..

Sum Of Two Values

Problem link: https://cses.fi/problemset/task/1640/

explaination

Sort the array in O(NlogN) and then iterate through the array. For each element A, binary search the array for sum - A.

Code

// Write by yourself
© 2024 skohan   •  Powered by Soopr   •  Theme based on   Moonwalk