If you want to work in a company, you can learn algorithms first and then advanced mathematics. Learn from the previous ones and you can enter the company. But if your math ability is poor, doing some programs will affect your thinking ability. Because you don't know anything about calculus (of course, this kind of thing is rarely used by companies, just to measure your development potential).
If you want to go to some academy of sciences or something, you have to behave yourself.