what language did you use?
you will be able to get by showing an understanding of the problems and how to solve them. for example if they ask a question that requires you to write code for the answer, and you cant remember the syntax just write in psuedocode or english. eg if the questions something like "write a function that searches a linked list for an item n" you could write something like "i would traverse the list using the structure/classes next pointer field, checking the data member to see if it was equal to n. if the item was found i would stop searching and return it, otherwise i would return NULL. if the list was sorted, i would stop searching as soon as i reached a value greater than n and return NULL" blah blah. obviously its much better if you can write the code, but if you cant, english is better than nothing. it shows you can apply the knowledge you learnt in the unit to solving problems, which is what they want to see.
if i were you i would understand the following things (based on leafing through the lecture summaries):
classes - the basic syntax of them, what public/protected/private do and inheritence.
sorting - bubble sort, insertion sort, selection sort. be able to trace through them and time complexity in big O notation
searching - sequential search and binary search how they work and time complexitity
data structures - linked lists (recursion and iteration), stacks and queues. (hooray for stl!)
a bit of the architecture stuff.
all of this stuff you'll build on if you do 225.
when i write a recursive function, it generally takes the following structure
the exit condition
checks to see if ive found what im looking for
recursive call
people seem to have a lot of trouble with recursion, but thats all there is too it. its rare you'll be asked to write a recursive function thats more than 10 or so lines. for the above question looking for n id go
struct foo *
search(struct foo *f, int n)
{
if (f == NULL)
return(NULL); //the exit condition, ie when the search is over
if (f->data == n) //checks to see if ive found what im looking for
return(f);
search(f->next); //recursive call
}
if the list was sorted itd look like this
struct foo *
search(struct foo *f, int n)
{
if (f == NULL || f->data > n)
return(NULL); //the exit condition
....
as above
}
the iterative version is more or less the same.
struct foo *
search(struct foo *f, int n)
{
for (/*nothing*/; f != NULL; f = f->next)
if (f->data == n)
return(f);
return(NULL);
}
the biggest thing is time management. most exams are worth either 90 or 180 marks in total which means you can work out exactly how many minutes you spend on each question (assuming its a 3 hour exam, which it probably is). for each new part in an exam i go through and write down by what time i should finish that question. then when i start a question i write down what time i should finish each of its sub parts (eg part a, b, c). then stick to it like glue. if i run out of time or am stuck just write down any old crap that vaugely relates to the topic of the question. it cant hurt.
goooooooooooooooooooooooodddddddd luuuuuuuuuuuuuuuuuucccccccccccccccccccckkkkkkkkkk!!!