Which is the most difficult CS subject/theory that you studied but important to the field?
Discrete math.
It was difficult because the theories are very loosely related to each other but they're used in CS. Too much memorization I guess...
Proof by Induction, Big O, recursion, divide and conqure, Graph Theory, blah blah.. argh!
Compiler for me was easy, because we had to take Theory of Automata. ^^