I’m convinced it was premeditated.
He may have planned to kill them but didn’t know where they lived or the layout of their house. That would explain using the knife (very personal) but killing the two other roommates (not knowing the layout of the house).