Almost everyone has exes (barring my parents, who started dating at 15 and have been together ever since. But they might just be the only exception to this rule). Beyond that, almost everyone has the unavoidable ex. The one that you can't ever dump, not completely, because you're always going to see them around.
I've seen people go to ridiculous lengths to avoid their exes. Really, ridiculous. I have vivid memories of my best friend's broken engagement, and how we couldn't go out to eat at all of our old favorite restaurants for fear she might run into the ex-fiance. She actually created a list of places they frequented as a couple (a fairly long one at that), and made absolutely certain to steer clear of all those locations for about four months. What happened in the end? Not a reconciliation, or a confrontation, and certainly not her coming to terms with the end of their relationship. He moved halfway across the country. I honestly don't know how long she would've insisted on carrying on like that if he hadn't, because she was fairly certain they could never again hold a civil conversation.
But on the flip side of that, I've seen people go to ridiculous lengths to stay friends with their exes. I'm one of those people. I have a terrible habbit of introducing my current boyfriend into my friend group, and then dating him so long he becomes a part of it. Then, upon our inevitable breakup, I can't very well tell him to stay away, because my friends are his friends too. They were mine first, but "kicking him out of the group" seems cruel and immature all the same. When my next relationship begins, the cycle continues- and the new boyfriend is usually horrified to discover that I dated all of the guys I spend the majority of my free time with. Other people maintain friendships with former lovers to appear overly tolerant or sophiscated.
I work with someone who has a rule- never date someone you see on a regular basis. It's a nice idea in theory, but cuts out a lot of perfectly good options. Needless to say, this particular friend has more one night stands than serious relationships.
There's a lot of things to think about when it comes to this issue, and I'm still struggling. The only two things I know for sure are:
1) Nobody wants to be friends with someone who can't be in the same room as their ex without making a scene
2) Nobody wants to date the person who is uncomfortably close with their ex
So if you can absolutely help it, make sure you can cut off ties with a person before you date them. Your co-worker or your best friend's sibling may not be the best choice. But if you can't help it, then remain friendly with the person. Don't ignore them, don't go to great lengths to avoid them. Maybe have an honest conversation about what you plan to do about those inescapable run-ins. But don't make it your personal mission to be their best friend, just to prove a point about your maturity level.