How to deal with a student who most likely has a mental condition, and keeps arguing with me in class? I am a TA for an introductory computer programming course at a university in the US. There is one student in particular who, during lecture, will argue with me about every point I make, which eats up a lot of lecture time and becomes un-enlightening for the students, as I am mainly repeating myself to answer the question/respond to the argument.

The student doesn't have previous knowledge in the programming language, so I don't think he's some conceited maniac trying to prove that he's better than me. Simply put, I think the best inference is that he has a sort of mental condition.

For instance, if I show an example on the board, he might blurt out that it's wrong, and try to explain why. While I appreciate students double-checking me, almost 100% of the time, the examples and points that I make are not incorrect, and after explaining it, he becomes quiet for a little bit to process what I said, and tries to point out another flaw. Essentially, he would try to challenge me if I said "1 + 1 = 2", if he could.

These debacles can go on sometimes for up to two minutes before I have a chance to move on. Very frequently, he asks questions/challenges me on things that I just explained or went over, so the class doesn't benefit from this, and it's generally a non-productive use of time. Often times, I will say something like, "If you'd like to discuss this more, we can during office hours," which is a statement that he seems to ignore completely, and will continue his questioning even after I've said this.

Additionally, when I am helping individual students in the classroom during work time, he will shout out to me from across the room to tell me something or ask me a question, and when I say "I can help you shortly when I'm done with Sally here," he will sometimes leave his seat and approach me directly, interrupting my conversation with the student.

How do I deal with a student like this? It seems like he has a mental condition of some sort, based on his interactions and mannerisms, though I've never received a notice from the university's disabilities department. The reason why I bring up the possibility of a mental condition is because he is set off very easily, so I'd like to handle the situation as delicately as possible.
I have responsibility for students with alternate needs within a Computer Science department and thus have professional experience of the situation you describe. It is not uncommon in our subject.

Our experience is that computing attracts a higher proportion of students on the Autistic Spectrum than do other disciplines. We are operating with about (my personal guess) 2-3% (of total cohort) diagnosed and perhaps double that number undiagnosed. 

Some of these students are often not aware of the rest of the class being present and treat teaching as a personal one-to-one dialogue with the teacher. They act as they would sitting with you across a desk. Sometimes it is more extreme and the social norms and boundaries of even working one-to-one are not clear to them. Although, as a spectrum condition, each person may be different, it is common that they wish to understand every point of minutiae before they can build the big picture understanding; becoming detailed obsessed is often a common trait. This leads to question after question as a form of quest.

You should seek advice from a more experienced professional in your institution. It is likely that the student's condition is known, but details are often considered confidential and perhaps not shared with you, because that is what the student may wish. The student may be receiving support elsewhere, perhaps in the form of mentoring. If that is the case then the mentor may be able to assist in explaining the social situation to the student and also give you guidance on how to reply.

Sometimes such students are not diagnosed with any specific condition and are not receiving support as it has never been needed. They are likely to have achieved high grades in earlier studies and the good results have propelled them through to your class.

For a student who is unaware that their behaviour is different from others in their class it is more difficult to handle. I ask such a student to speak to me in a one-to-one appointment in my office. I do not assume that they have any named condition, as this is not really relevant. I just talk to them to explain how lectures work, clarify my role and how I can answer questions. I often have to explain, sometimes in great detail, what makes a good verbal question in class, what makes a good verbal question, what makes a good written question for email, what makes a good question for the class VLE, what makes a good question for StackExchange and so on. It is often the case that no one has ever explained how information is obtained. It does take a degree of tact and experience to do this, which is why I suggested seeking more experienced advice.

Remember, some of the achievements in our subject have been made by people who others found difficult to work with. Look at the movie "The Imitation Game" and you can clearly see (in a fictionalised portrayal) Alan Turing is shown displaying tendencies similar to those you describe. I'm sure if you had a current student with similar attributes you would have been pleased to have had the opportunity to have someone so similarly gifted in your class.