>>12473455Forgot that:
Input should be (G = (V,E), k)
That doesn't really matter tho, unless you are asked about space complexity.
Also I checked the runtime. My program would be around
I think the better solution is to check each vertex for it's neighbor count.. Then every time you find one <k you remove it and check each neighbor if it's count is still above k.
Like that you at most have to check vertexes.