Should I withdraw my paper if I find another paper published with the same idea? I submitted a paper and it is currently under review (submitted on 10th March and conference is on 15th October, I'll be notified on 15th July). However, now, in May, I see a paper has just published dealing with the same problem as mine. They indicate that their solution is better than mine. If my paper is accepted, do I have to withdraw it, as it seems to be out of date?
It's a slightly grey area but assuming the journal paper in question was not publicly available before the submission date of your conference, I think you are fully entitled to publish the paper if accepted. It's a parallel result, which means there was (verifiably) no wrong-doing on your part. If accepted, in the "camera-ready" submission, you can add reference to the journal paper with a note that their results were developed in parallel (with mentions of the dates involved in a footnote, for example). You get your publication, the authors of the work get their citation, and the conference themselves know that there was no wrong-doing involved.

So again, you don't have to withdraw, but you can if you want (e.g., if you don't want to be associated with a weaker form of the result, or if you are a really nice person and feel that the slot at the conference might be better used elsewhere).