kaist-cp / cs220

268 stars 53 forks source link

Additional Announcement for the midterm exam. #407

Closed Lee-Janggun closed 1 month ago

Lee-Janggun commented 1 month ago

This is an additional announcement for the midterm. Please read it carefully, and make sure to ask any questions you have.

Charging Laptop

Exam Time & Structure

The exam will be from 1:00PM to 3:10PM, and will consist of three parts

Once we start intermission, you won't be able to go back to part 1.

Each part may start a bit late depending on how to exam goes (e.g., start on 1:05 PM for part 1, and 2:45 PM for part 2).

Network

We understand that the network at 1501 is not that stable. We will prepare additional routers for better network connection during the exam.

Update: the CS administration team has enhanced the E3_1501 network. We will use that for the exam.

Short Answer Questions.

TL;DR

mhchung04 commented 1 month ago

If the answer required to give several lines, how should I indent? When I should answer the code including, println!("Hello"); println!("World");

then should I submit println!("Hello"); println!("World");

or whether println!("Hello"); ____println!("World");

Lee-Janggun commented 1 month ago

@mhchung04 Do the first, the second won't compile.

mookyung-choi commented 1 month ago

In google form, the answer should be as follows

    println!("hello, world!");

I am confused about the submission format. For example, In the first question of Rehearsal part 2, What format should I submit it in google form?

    let mut sum = 0;
    for i in input {
        sum += i;
    }
    sum

or

let mut sum = 0;
for i in input {
    sum += i;
}
sum

sum

Lee-Janggun commented 1 month ago

@mookyung-choi. They will both work, you don't need to care about indent or format (I'll update the issue to explicitly mention this).

ICubE- commented 1 month ago

For questions asking about runtime behaviors, is the runtime environment ideal? In other words, is the memory infinite?

Example: This is a question from previous exam. I think this code terminates for all a, but it aborts with stack overflow for some inputs in my PC.

// Question: `foo` function terminates for all `a`.
fn foo(a: i32) -> i32 {
    if a < 10 {
        return a;
    }

    foo(a.wrapping_add(1))
}
Lee-Janggun commented 1 month ago

@ICubE- For part 1, you can assume infinite heap space/stack space unless specified otherwise.

For part 2, since they are coding problems, you do need to care about it.