I find it surprising and unfortunate that you didn't get to study algorithms and discrete math more in your university studies. As you seem to have realized, a person can know how to code, but without math, won't be able to solve really interesting problems.
Unfortunately there is no "Learn all algorithms you'll ever need in 21 days for dummies" book. There are hundreds, possibly thousands, of algorithms—even more if you also consider data structures—and it just isn't possible for anyone to know them all. There are no shortcuts to algorithms and math, something which has frustrated me numerous times too. All you can do is throw yourself in and let the knowledge slowly build up.
I would recommend getting yourself a good book on algorithms—my choice would probably be Steve Skiena's The Algorithm Design Manual since it assumes less math background than the more popular Introduction to Algorithms—and a good book on discrete math, of which there are several. I've heard good reviews of Concrete Mathematics but haven't read it as it's a little pricey. Sometimes books use the term "discrete math" in confusing ways; make sure the one you get covers at least graph theory, recurrence relations, Boolean algebra, basic set theory, basic combinatorics, and basic probablity, as those are the most vital topics for a software developer. A book on statistics and probablity, like this one, freely available online and written by a professor from my university, wouldn't go amiss either. And both linear algebra and abstract algebra are useful surprisingly often; I like Gilbert Strang's Linear Algebra and its Applications and Charles Pinter's A Book of Abstract Algebra for these topics.
The great thing about this is that not only will you learn algorithms, you'll also get better at coding, and get more familiar with your chosen programming language, by being forced to solve unfamiliar problems. If there's some feature of your language that you've always wanted to use and never been able to, these kinds of exercises are a great way to do that too; I first really dug into Java generics while working on a problem about binary trees.
Finally, just remember that you don't have to know every algorithm off the top of your head. The Hungarian Algorithm in the question you linked is a special purpose algorithm for linear algebra. It's not something most programmers ever have to deal with. Contests do not reflect reality in that way. A contest might expect you to have memorized obscure algorithms and be able to implement them from scratch without any references in a short period of time. When you encounter problems in the wild, it's much more vital that you can clearly state the problem, identify what kind of technique or approach might be helpful, and do research to find something that can solve your problem. In my opinion, it's much more important to look at a problem about matrices, be able to think "This problem is about matrices. I should look at some linear algebra algorithms. Those are probably in a book about numerical algorithms", and then be able to find the Hungarian Algorithm and implement it, than it is to memorize that algorithm and be able to code it off the top of your head.