Skip to content
Get App

Midterm review

Midterm review video where an instructor previews exam format: digital, about 4-5 questions over 90 minutes, covering stacks, queues, linked lists, and Big O complexity analysis.

Key Takeaways

  • The midterm is digital, about 90 minutes long, with roughly 4-5 questions.
  • Stack and queue operations, including index-based content answers, are central to the exam.
  • Big O analysis, including loop counting and dominant terms, is an expected skill.
  • Answers should be clear, correctly coded, and show index positions where required.

What the video covers

  • The exam is fully digital, with no paper, and answers are written in English on the computer.
  • The exam lasts 90 minutes, runs from 9 to 11 AM on 12/2, and contains about 4-5 questions, including Big O analysis.
  • Questions cover true/false concepts, complexity of combined functions (taking the maximum of the two), and coding tasks.
  • Coding questions focus on stack and queue operations implemented with arrays and linked lists, not full programs.
  • For stack/queue content questions, answers must list each value with its index, since index zero is the first element.
  • Students are told to write code cleanly and correctly, using the given class names exactly, though full programs will not be required.
  • Big O analysis tips: loops execute n times, nested versus sequential loops are handled differently, and the dominant term is kept.
  • Once a question is answered, students cannot return to it, so careful reading is advised.
  • The instructor stresses academic integrity and says cheating attempts are not expected.
  • A Moodle bug and scheduling details are discussed, and students are reminded that the exam opens based on their device's time.

Answers

Questions about this video

How long will the midterm exam be?

The instructor states the exam will last 90 minutes, from 9 to 11 AM on 12/2. The exam opens at the start of the window so students who had login issues have extra time.

What format do stack and queue content questions use?

Answers must list each value with its index, starting from zero, since index order matters. The instructor will not require a drawn table, just a clear textual listing such as zero is 10, one is 50.

Will students need to write full programs on the exam?

No, the instructor says full programs will not be required. Students will write specific parts of code, using the class names given, and the code only needs to be complete and correct for the requested portion.

Full Transcript — Download SRT & Markdown

00:08
Speaker A
Is the screen visible like this? Alright, peace be upon you, I hope you are all doing well.
00:27
Speaker A
Look, I am going to give you some questions similar to what will be on the exam. What will the exam be like? It will have, well, not a lot.
00:38
Speaker A
There will be questions on, for example , questions that might be about how I enter its order?
00:46
Speaker A
Or about But the code, of course, won't be a whole program, maybe just specific things like that, and a question, so here, this is considered as if it’s the exam, it will be almost like this.
01:03
Speaker A
So, for example, the first thing is about what might come. Simple, I just said I'd show you so you can see what the exam will look like.
01:15
Speaker A
Here, for example, the first question. Is this true or false? False. False, exactly, because it’s the first thing that enters, this is real.
01:34
Speaker A
It is The animation didn't work, okay, fine, there is something else, which is X1 and X2 and their, well, it's 2f (n) and g (n), how is the complexity of the calculated?
01:53
Speaker A
It is calculated for both, okay, it is basically the maximum of the two, why?
02:00
Speaker A
Because we agreed that when I have, for example, one n-squared and one n, for example, I take the...
02:10
Speaker A
Okay, and we took this as well in the questions that were in the previous lectures.
02:16
Speaker A
Is that okay? Okay. Alright, then there is this question, for example. This is from previous exams that I had made. Meaning for other places, for example. This gives you the of the whole. The.
02:33
Speaker A
What is the. And what are the in it. And these things we are supposed to know. So I will give them to you in the exam. You don't have to memorize them.
02:43
Speaker A
But since I gave them to you, you must for the. For the name of the thing. Meaning the.
02:54
Speaker A
So the must have the same name as it is written. Actually, this will be, so it must be, okay, and.
03:02
Speaker A
So I must know. The will be. This is the. And of course, there is the which is of .
03:15
Speaker A
Done, I have given you the. But, of course, in the exam, you won't be able to write all of this, because there won't be time.
03:20
Speaker A
So, the question is often, for example. For example. Okay, so you will just write the.
03:29
Speaker A
Which is the, okay? Which is normal, just as we took it. First, it asks, it must check before it does whether it is or not.
03:41
Speaker A
And if it finds it, okay, it will increase the, and put the in the new.
03:47
Speaker A
And if I am doing, first I will check if it is or not for the.
03:51
Speaker A
So if it is. Otherwise, I will say that the is the of the currently present, and I will decrease it by one.
04:00
Speaker A
Okay? I think you have taken and such things, and I believe these things are not difficult at all, go ahead, Engineer Hossam.
04:13
Speaker A
Now, in the exam, will we state, for example, what its function is, or state that it is, or how is the nature of the question?
04:24
Speaker A
The question, well, maybe here, but I forgot to write before it, but it is, and it is supposed to.
04:33
Speaker A
I mean, I just mean. We won't be strict about their, whether it is or or this, but the function of the code itself, its correct writing?
04:44
Speaker A
Uh, writing the code, uh, writing a complete and correct code. But it will be a specific type of writing, not...Not complete, that is. I will never tell you to write [the full code] or...Or those three basics you learned. I mean, I will never ask it of
05:00
Speaker A
you like that, okay? But I will tell you to write it. And also, I mean, I will state this.
05:05
Speaker A
Since I am making this video to... Emphasize the exam. The exam does not have paper. And it doesn't have those things. Everything is digital, so you won't be doing that.
05:16
Speaker A
Therefore, there shouldn't be any attempts at cheating. You won't be going out or taking photos. The exam is just a normal one. You write everything in English. And it can be written [on the computer] perfectly.
05:29
Speaker A
So, whoever wants to have pen and paper to solve and write, that's fine, but honesty is between you and God, so no one should write something on paper and send it to their colleagues and such.
05:43
Speaker A
So, I hope we maintain integrity and avoid any cheating attempts. Okay, but this will be written on [the system], then I might tell you, for example...
05:57
Speaker A
For this [class] to have a size of five . Using the [class] that was created. I will write my main function. And I will define the [class].
06:11
Speaker A
And I will say that it has five. Like this. It takes the [class] and creates it. I might put numbers in it, for example. I'll try putting 10, 20, 50 in it, even if the question didn't say so. But, mostly if it comes in the exam
06:25
Speaker A
. I might tell you to put these specific numbers in it. Okay. These are the coding questions; the code we've taken so far is about Stacks and Queues using [arrays] that you took in the lecture, and you've taken them using
06:39
Speaker A
linked lists too. And the linked list itself, those are the codes we have taken, okay.
06:48
Speaker A
But there is a type where we look at the content of the stack, for example.
06:54
Speaker A
I give you a few [operations] and ask you what the stack has at the end?
06:58
Speaker A
And here I will give you the... The index and the number; whether this question is about a stack or a queue, you must write the index next to the number.
07:09
Speaker A
Because the order is important. Because index zero is the first one, at the very beginning. It is. So, if for example I ...
07:21
Speaker A
Put 10, 20, 30, I must put 10 at zero. And 20 at one. And 30 at two. So don't write it without the index. Because I won't know if you understand the concept or not.
07:32
Speaker A
Okay, so the answer to this question here is easy; I put 10, 20, 30, 40, up to three pops, so those three numbers are gone, then I add four more numbers.
07:43
Speaker A
Which are 50, 60, 70, 80, which will be here. And the 10 remained as it was. So if I asked for the content of this stack. I would do it like this, in this format.
07:55
Speaker A
I won't draw a table in the exam, but ...You just say, for example, zero is 10 , one will have 50, two will have 60, okay?
08:04
Speaker A
Whether it's a stack, a queue, or anything related to the array. Of course, it doesn't have that, but if there's a question like this, you must include the Big O in it.
08:14
Speaker A
Alright. It’s easy, I think it’s easy, this is simple stuff. God willing, don’t worry, the exam is not difficult, it will really be like the assignments.
08:27
Speaker A
Okay. Does anyone have a question? Doctor, how many questions are on the exam? There will be about four or five questions, including the Big O. And it will be an hour and a half.
08:47
Speaker A
From nine to eleven, it’s supposed to be . An hour and a half. Is it open for the duration of the call right?
08:57
Speaker A
Once you open it, it will last an hour and a half, but I will open it from nine to eleven so that if anyone has a problem or couldn't log in, I’m giving you some extra time.
09:07
Speaker A
Right, but the exam will be an hour and a half; I’ll write that down anyway.
09:13
Speaker A
It will be an hour and a half long, and I... What will I do?
09:20
Speaker A
Sorry, it will be such that once you solve a question, you won’t be able to go back to it again.
09:25
Speaker A
So, I hope you take your time solving the question and read it carefully. Okay .
09:31
Speaker A
I mean, okay. Here is the question that is surely coming on the exam, okay, and here it is , and I am supposed to...
09:40
Speaker A
Of course, we covered these questions in the lecture, and you surely saw the assignments and such.
09:46
Speaker A
To save time during the exam, when you get things with loops, I can do it step-by-step and say the complexity of the first one, and here for example...
09:57
Speaker A
Anyway, the loop that goes from one to n is executed n times, even if you say n + 1, it will come out as n.
10:03
Speaker A
And all these things will be executed n times. So, in the end, the story is that you will find yourself with, for example, 15 + 3n + whatever, okay?
10:16
Speaker A
So, in the end, I take the Big O, so you don't have to do it that way; you can solve it briefly.
10:21
Speaker A
We can solve it step-by-step or briefly , okay? I can solve it step-by-step as we learned it; I can say this, for example...
10:31
Speaker A
Okay, and I can say that this is...and I can say that this is n directly, and surely, sorry, this is n, okay?
10:43
Speaker A
And this will be n times. It is inside the loop, so it will execute n times.
10:49
Speaker A
And this will be n times. And this will be n, which is for this loop, it’s something else entirely.
10:59
Speaker A
These loops are separate from each other , not loops inside loops, so it's easy.
11:05
Speaker A
And this will, of course, be executed n times, the same thing, which is n times , but I can't write it.
11:10
Speaker A
And here it will be executed k times, from k. So it is running from k until it reaches n.
11:21
Speaker A
So this will be executed k times. So you will find this is k, okay?
11:25
Speaker A
And the one inside this will be executed k times. This will be executed k times.
11:34
Speaker A
And this will be executed once, and this will be executed once, okay? If I calculate this, I will find that I have 1 + 1, and here—so here 1, 1, 1, 1 —4 + 3n + 2n + 2k, okay?
11:54
Speaker A
So in the end, we remove these numbers, so in the end, what will my Big O or complexity be?
12:00
Speaker A
n plus m plus k. If I apply this logic just to the loops , you will find that the loops, in the end, are as shown here.
12:11
Speaker A
You will find here that the first loop is n. The second loop is m. And the third loop is k. And all of them, in the end, result in one, because they are numbers .
12:22
Speaker A
So, it comes out to one. It is as if I am adding all of this together, and this is not.
12:28
Speaker A
So, in the end, it will be n plus m plus k. That's it. Don't worry, the question will be easy, not difficult.
12:37
Speaker A
It's from the things we covered, and similar to what was taken in the lecture .
12:42
Speaker A
So don't worry about this question at all. Well, if you understood what was in the lecture and the question similar to this , you will find, God willing, that the code is easy and things are not difficult at all.
12:53
Speaker A
Okay, that's it. This is the exam; the questions will be similar to this. The question on the question on is done for example On code, you will write code and a question.
13:10
Speaker A
And regarding the questions done on and k and things like that, if you remember , specifically there were several.
13:17
Speaker A
There was the one that is, and there was the one for counting. The one that is and those things. You might be asked about these things, Like, for example, what will remain in the end. Will there be or not, things
13:34
Speaker A
like that. So just study these things well. Okay. Well, is Regarding the exam, did they say it's postponed or is the Saturday date still on?
13:48
Speaker A
Is the exam postponed, or is the exam for this subject on 12/2? Has anything changed regarding this date?
13:58
Speaker A
Still on. No one notified me that anything was postponed; I was notified that the entire exam schedule was sent.
14:13
Speaker A
Yes. They are saying, they are saying, I'm asking, I know, I haven't opened Moodle .
14:18
Speaker A
No, I don't know, I haven't received news that it was postponed. And whoever opens the portal, as of now , it's on its scheduled time.
14:27
Speaker A
As of now, it is 12/2; of course, it's still early, but you surely have other exams before it.
14:33
Speaker A
So, it is on its time, 12/2, from 9 to 11 in the morning. According to your time, and I am already setting it on Moodle, it opens according to the time of the device you are opening it from, just so you don't get
14:44
Speaker A
confused. But from 9 to 11, it will last an hour and a half. Once you open it, it will count 90 minutes for you.
14:53
Speaker A
Okay. And the entire exam is done on Moodle. Something important I want to say: Moodle, I don't know why, when you type a bracket, one, and a bracket, it converts it for you, kind of like an emoji.
15:08
Speaker A
Okay. So when you write something like that, put an underscore before and after it; that way it won't be converted.
15:15
Speaker A
Okay. That's how Moodle is, I don't know why. It was a bug in it; it's like a built-in feature where it does that when it sees a bracket, one, and a bracket, even if you leave a space, it will still do it,
15:28
Speaker A
so it's safer to put an underscore before and after it. Okay, I understand that this or in n normally.
15:35
Speaker A
Okay. Okay. Alright, does anyone have another question? I mean, good luck on the exam, and no one should worry at all; God willing, the exam is easy.
15:51
Speaker A
I know the course is a bit exhausting in its practical work because it involves some intense programming, but hopefully the exam won't be difficult at all; it will be similar to what I just told you , and I am recording this video to
16:04
Speaker A
upload it. It will be like the regular lectures, and I will post this file on Moodle.
16:11
Speaker A
And you will have all these materials, okay? Alright, does anyone have any questions before we finish?
16:20
Speaker A
Thank you very much, Doctor. Thank you to you too.
Topics:midterm reviewdata structuresstackqueuelinked listBig O complexityexam formatalgorithm analysisMoodlecomputer science

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →