For software this is the hardest thing for me learn, I can do the simple ones but the medium to hard ones are really challenging and I got no idea how to do them. So how do you guys study for these algorithms
For the medium to hard ones you just have to break it down line by line. What helps me the most is desk checking it or implementing it into Visual Basic (or whatever language your using) and seeing what happens.
Specifically for sorting algorithms, I found that it was easier to understand once it was visualised. This website was particularly useful for sorting algorithms. http://sorting.at/
Remember for exams it is better to understand the medium to hard algorithms rather than just memorising them
Make a map (mental or other) of how data flows within an algorithm; what data is being sent around to each function keeping in mind the purpose of the system to visualise how input becomes output.
Use Eclipse (or Sublime, if that's your thing) where possible for proper syntax formatting/highlighting and don't be afraid to modify the code to make it easier to understand, whether it be changing variable names to be more verbose or refactoring chunks of the code to make it more succinct.
As for psuedo code, I personally think it's much more difficult to understand than actual code... I find it easier to translate it into actual code, but you could also even transform it into a flow chart and work from there.
Another thing that might help is working top down. Make a very general algorithm that describes each step that has to be done, then break it down and do more and more specific tasks and operations until your code completed all the tasks you made in the beginning.