Of course, Inverkeithing Public School wasn't a 'public school' - as in the weird use of that term for a private fee-paying school like, say, Eton. It was simply the school that the children of the general public attended.
In 1888 it was situated next to, and north of, Inverkeithing Parish Church. The old building still exists.