Course topics 1 and 2

This page has a summary of all the course activities you can attend or submit this week.

Weekly exercises sessions

No weekly exercise sessions this week (they start on lecture week 3).

Self-study (videos and slides in English)

The topics for this week are as follows: (i) Algorithms and pseudocode, (ii) Decrease-and-conquer, (iii) Insert sort

The following links will take you to the video-lectures and the accompanying slides:

Lecture-questions

An algorithm is
Which of the following are important properties of a well-specified algorithm? (There may be more than one correct choice.)
Suppose person X presents an algorithm using pseudocode and person Y reads it. What assumptions can X make about Y? (There may be more than one correct choice.)
Suppose person X has invented a new algorithm for solving some particular problem. X writes pseudocode for the new algorithm. Which of the following best describes what X’s main goal should be in presenting the new algorithm as pseudocode?
Typically pseudocode for an algorithm does not include testing for errors or testing the validity of the input data, whereas code for real-life applications should include such testing. Of the following, which is the best explanation for this lack of testing in pseudocode?
Suppose we are given pseudocode for some algorithm. When implementing the algorithm in some programming language like C++, which of the following should we take into account? (There may be more than one correct choice.)
Which of the following best describes the decrease-and-conquer strategy?
Insertion sort works by
When the size of data input to insertion sort increases, the amount of computations insertion sort must do
Which of the following indicates that insertion sort uses the decrease and conquer strategy?
What is a central question, related to this course, whose answer can be found in this week’s videos?
Of the following topics, which do you think deserves further discussion/explanation during the weekly consultation session?
Were there any parts of the video lectures that were particularly difficult? Particularly interesting? Something about which you wish to learn more?

Extra links on the topics:

Submit weekly exercises

Nothing to submit yet! (Weekly exercises start on lecture week 3).

Course topic 2

Self-study (in English)

The topics for this week are as follows: (i) Algorithm efficiency; introduction, (ii) Sharing data, (iii) Recursion

The following links will take you to the video-lectures and the accompanying slides:

Lecture-questions

What do we actually measure when measuring an algorithm’s efficiency?
Why is the asymptotic performance of an algorithm interesting?
Choose the correct claims. (There may be more than 1).
Why is measuring the amount of time an algorithm takes to compute the solution not a feasible way to measure an algorithm’s efficiency?
Suppose we have pseudocode for some algorithm A and we are given the efficiency analysis for this pseudocode. What can we do with this efficiency analysis?
In what aspects of programming does wise data sharing help? (There may be several correct choices.)
Suppose computer language X uses value semantics and computer language Y uses reference semantics. Suppose a large object A exists and we have the following code line: B=A. Which of the following is incorrect?
Suppose in C++ each element of array A contains a large object. Several techniques can be used to share the elements of A: pointers, smart pointers, indices and so on. Which of the following are true? (There may be several that are true.)
Recursion is very useful because
When a recursive procedure is executing, which of the following statements about the call stack is true? (There may be more than one true statement.)
Suppose array A contains numbers that are ordered from smallest to largest and we use a recursive binary search to search for an element. Which of the following statements are true? (More than one may be true.)
Suppose X is a recursive procedure. Which of the following is true regarding the cases that are present in X?
What is a central question, related to this course, whose answer can be found in this week’s videos?
Of the following topics, which do you think deserves further discussion/explanation during the weekly consultation session?
Were there any parts of the video lectures that were particularly difficult? Particularly interesting? Something about which you wish to learn more?

Submit weekly exercises

Questions to be submitted this week