In general, snakes need a cage whose length + width equals the length of the snake. You can cram them into smaller cages, but I think you are better off giving them "room to stretch".
In regard to kingsnakes as pets,...it depends.
Common Kingsnake subspecies and morphs (Lampropeltis getula ssp. - Florida, Eastern, Black, Speckled, Mex Black, California, Desert, Blotched, South Florida) make great starter snakes. Some of the babies can be a little high strung (particularly cal kings) but they generally become dog tame, eat readily and have no special care requirements that are different from other colubrids. They should be kept alone, of course. They are easy to keep, easy to breed, and are good, responsive pets.
Other species of kingsnake, such as Durango Mtn Kings, Gray-banded Kings, AZ Mtn Kings are a little more finicky, especially as babies and require more effort to get them through the winter. They are also less active and so aren't going to be out crawling around as often. I would steer away from these species for now.
-----
Chris Harrison
...he was beginning to realize he was the creature of a god that appreciated the discomfort of his worshippers - W. Somerset Maugham