@joshi_nitish how you are getting this answer?
As if k = 3 then n = 5, we have vertex {A,B,C,D,E} now A is adj to 3 vertex as k = 3 A-B, A-C, A-D now how we will have E as degree 1?