How to Find Positive Integer Solution for a Given Equation using Bruteforce, Two Pointer or Binary Search Algorithms?

Given a function f(x, y) and a value z, return all positive integer pairs x and y where f(x,y) == z. The function is constantly increasing, i.e.: f(x, y) …