You do not have to share a room with the opposite sex if you do not want to. Quite a lot of hostels have single-sex dorms for those of you who do not want to share a dorm room with the opposite sex. So if that's a priority for you, you should not have a problem finding a place to stay.