Q. Regarding a two bedroom apartment, can a man and women share the bathroom and kitchen while each lives in a separate private room with locks on door? What if there are more tenants? Would a security camera make a difference?

A. Horav Shlomo Miller’s Shlit”a opinion is that sharing an apartment in the particular setting you describe is not a good idea as it can easily lead to the yichud prohibition of seclusion and then promiscuity, even if more people reside in the co-ed flat.
In question # 346 in this forum, Horav Miller recommended adding a security camera for office employees or for an elderly patient left alone with the female care-giver in question # 828 to avoid yichud.
We there mentioned that Horav Nissim Karelitz Shlit”a (quoted in Moriah-Elul 5771 p.146) maintains that security cameras are to be regarded as an open door to the street in regards to the yichud prohibition, which the Noda Beyihuda (E.H. 71) permits. He mentions that they do not have to be scrutinized on real time, as long as there is a possibility that the tape (or digital recording) could later be seen, and it is an effective deterrent.
We also quoted the Minchas Ish (p. 267) who permits yichud inside the safe deposit-box room in banks, due to the presence of security cameras. See also Nitey Gavriel (Yihud 45: 8 – p 283).
However, in the setting you describe even with installed security cameras, Horav Shlomo Miller Shlit’a strongly recommends to be stringent. This is due to the close familiarity and intimacy created by the daily mutual sharing of the unit’s facilities for an extended period of time.

Rabbi A. Bartfeld as advised by Horav Shlomo Miller Shlit’a