You said it right there — the edge you received was confidence. Women, especially, entering into CS programs today are often the minority surrounded by guys in high school and college. And while not all guys are socially awkward and inappropriate towards women at that age, many are. This makes it difficult for women who are being exposed to the materials for the first time when they have these boys in class who are immature and have tons of confidence because they’ve been exposed since a very young age.
In college, we’re all much younger and less mature and that extra confidence in a subject is more important than it might seem looking back. It can often mean the difference between staying in the subject when the classes get harder and changing majors.