Proving the time complexity of Closest Palindromic Number.(Brute Force Approach)

This is Brute Force Solution and while going through the solution in leetcode, it was mentioned that the time complexity for brute force solution is O(sqrt(N)) because the maximum increments or decrements needed is 2*sqrt(N). Can somebody explain how to prove this.

Link to LeetCode solution: https://leetcode.com/problems/find-the-closest-palindrome/solution/

public class Solution {
public String nearestPalindromic(String n) {
    long num = Long.parseLong(n);
    for (long i = 1;; i++) {
        if (isPalindrome(num - i))
            return "" + (num - i);
        if (isPalindrome(num + i))
            return "" + (num + i);
    }
}
boolean isPalindrome(long x) {
    long t = x, rev = 0;
    while (t > 0) {
        rev = 10 * rev + t % 10;
        t /= 10;
    }
    return rev == x;
}

}