Yeah you see I don't know what would count as the basics, but I am fairly certain I know the basics. It's just that the exam was structured so we had to use the course material we learned such as writing a method for a binary search tree, and knowing Time Complexity' and stuff like that, so I'm basically looking for a way to get better at coding so when I have to sit my repeat exam I can make sure I don't fail it.

Yeah you really did do a similar subject to me then, we did a lot on time complexity of algorithms. It seemed a whole lot more like discrete maths than programming, so I can see why you didn't go so well.

Fortunately stuff like time complexity isn't super important to know - don't get me wrong, it's important to be able to choose the right algorithm for whatever set of data you have, but once you've chosen it, you need to actually be able to code it, which is far more important.

To get better at stuff like time complexity/big-oh notation stuff, and binary search trees, I think youtube videos, tutorials, and textbooks will be the most helpful. For example, given a set of 10 ints and being told to put them into a BST is something that can be really easily taught by any medium since it's a pretty simple process. I'm not sure what sort of style questions your exam had/will have, but mine was split into two halves - content where you had to understand a concept, and where no coding was required, and then content where you had to code a solution. The concept sort of questions were like this one:

Code:

Question 2
(2 mark)
The following alternatives list expressions for the worst-case time complexity T(n) of various algorithms. Which
alternative has an asymptotic worst-case time complexity of O(n2)?
[A] 1000.log(n)
[B] 0.01n3 + 2n2 + 1000000
[C] 5n + 2n(n + 1) + 100
[D] n! + 5n2
[E] 2n + 5n2 + 3n + 1

There you don't need any knowledge of actually coding a solution, it's just understanding time complexity.

If it's the coding of the solutions that you need to get better at, again, write small programs and work your way up, supplemented by tutorials and stuff. Questions like:

Code:

Question 6
(4 marks)
In the space below write a function which reads an integer n using scanf, and then prints all the numbers from
1 to n in order, except not printing any number divisible by 7 or 3. You may assume that n is not negative.
For example if n was 15 the output would be 1 2 4 5 8 10 11 13
The prototype for the function is:
void printSome(void);

Require some basic programming knowledge. It's just up to you to find out where you're at with your coding.

TL;DR - I think you need to work out whether you're having trouble with coding solutions, or with just understanding the content that you simply need to understand and then memorise.