Is it permissible to be in an office building alone with a non-Jewish girl, during the day and at night? Many people have the key to the building.
The prohibition of yichud applies even to non-Jewish girls. Being alone in an office building with a girl would only be permitte if on a practical level others come in and out on a regular basis. It is unlikely that this is the case at three in the morning, and therefore the prohibition would apply. The actual possession of the key by others does not permit yichud if one can safely assume they won’t be coming to pay a visit.
Sources: See Rambam, Issurei Biah 22:3; Tur and Shulchan Aruch, Even Ha’ezer 22:2; Beis Shmuel 22:2; Minchas Chinuch 188:3 (all concerning yichud with a non-Jewish girl); see Rema, Even Ha’ezer 148:2 (somebody coming in and out); see also Maharil Diskin, K.A. 206.