Self-assessment quiz

Presentation & objectives

The following quizzes are here to help you check that you understood the articles you had to study. They are provided for self-assessment and will not be graded or stored.

Don’t hesitate to reach out on the Discord server for any precision/explanation!

Quizzes

--- shuffle: true secondary_color: lightgray --- # What is a data structure? What is a data structure? - [x] A way of organising and storing data so that it can be used efficiently. - [ ] A type of program that performs mathematical calculations. - [ ] A specific programming language used to manipulate data. - [ ] An algorithm that sorts data.
--- shuffle: true secondary_color: lightgray --- # Stack Which of the following statements about a stack is correct? - [ ] A data structure where elements are inserted and removed on a first-in, first-out (FIFO) basis. - [x] A data structure where elements are inserted and removed on a last-in, first-out (LIFO) basis. - [ ] A type of memory that allows random access to stored elements. - [ ] A data structure that only allows elements to be inserted without being removed. # Stack What is the name of the operation that adds an element to the top of the stack? - [ ] Pop. - [x] Push. - [ ] Add. - [ ] Remove. - [ ] Enqueue. - [ ] Dequeue. # Queue Which of the following statements about a queue is correct? - [ ] Elements are added and removed from the same end. - [ ] Elements are added at the front and removed from the back. - [x] Elements are added at the back and removed from the front, following the First In, First Out (FIFO) principle. - [ ] Elements are added in sorted order automatically. # Queue What is the name of the operation that adds an element to the back of the queue? - [ ] Pop. - [ ] Push. - [ ] Add. - [ ] Remove. - [x] Enqueue. - [ ] Dequeue. # Queue What could be the problems when using an list to implement a queue? - [x] Enqueuing may require shifting all elements. - [ ] Enqueuing may require resizing the array. - [x] Dequeuing may require shifting all elements. - [ ] Dequeuing may require resizing the array.