Let $\emptyset \ne A\subset \mathbb{R}^n$ and let $f:A\to \mathbb{R}$ be a bounded function. Fix a point $a\in A$ and denote, for $k\ge 1$, $N_k:=A\cap B(a; 1/k)$. I want to prove the following:
$$f \text{ is continuous at } a \text{ if and only if }\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=0.$$
My approach:
(=>): Suppose $f$ is continuous at $a$, then $f$ is sequentially continuous, so that $\lim\limits_{k\to\infty} f(x_k)=f(a)$ for some sequence $(x_k)$ converging to $a$. Now, $\lim\limits_{k\to\infty} N_k = \{a\}$, so that $\lim\limits_{k\to\infty}\sup\limits_{N_k}(f)=f(a)=\inf\limits_{N_k}(f)$, thus $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=f(a)-f(a)=0$.
(<=): Suppose that $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=0$. Then $\lim\limits_{k\to\infty}\left(\sup\limits_{N_k}\{f\}-\inf\limits_{N_k}\{f\}\right)=\lim\limits_{k\to\infty}\sup\left\{ \left| f(x)-f(y) \right|:x,y\in N_k \right\}$ $=\lim\limits_{x,y\to a}\sup\{\left| f(x)-f(y) \right|:x,y\in A\}=\lim\limits_{x\to a}\sup\{\left| f(x)-f(a) \right|:x\in A\}$
$\implies \lim\limits_{x\to a} \sup\{f(x)\}=f(a)\implies \lim\limits_{x\to a} f(x) = f(a)$. Hence, $f$ is continuous at $a$.
I'm not completely sure if I built my proof well enough from the analysis formalism viewpoint, so I would appreciate your insight and comments. Please let me know if my proof appears to be OK.
$\sup\limits_{N_k}\{f\}\geq f(a) \geq\inf\limits_{N_k}\{f\} \ \ \ \forall k$
$\lim\limits_{k\to\infty}\sup\limits_{N_k}\{f\}\geq f(a) \geq\lim\limits_{k\to\infty}\inf\limits_{N_k}\{f\}$
Start with some $\epsilon>0$. Given the limits on the difference between sup and inf we know that for this $\epsilon$, there exists $N$ such that for all $k\geq N$, $\sup\limits_{N_k}\{f\}-f(a)<\epsilon$ and $f(a)-\inf\limits_{N_k}\{f\}<\epsilon$. (kind of like a sandwich argument)
Now, $|f(x)-f(a)|\leq \max(\sup\limits_{N_k}\{f\}-f(a), f(a)-\inf\limits_{N_k}\{f\})$
Now put delta equal to the saze of the interval and that completes the proof. I think you have the same thing in mind, maybe mine looks slightly cleaner?