CS331 - Datastructures and Algorithms

Version 1

Course webpage for CS331

Midterm 2

Sunday, April 18th 12:00 pm - Monday, April 19th 9:59 pm (submission closes 11:59pm),online

You will have 2 hours to complete the exam within the time period mentioned above. The exam will be handed out through blackboard and you will upload the solution to blackboard. The exam will be made available as a pain text file. Please

For students that are unfamiliar with blackboard, please ensure that you have access and try out the mock exam that we created so that you can get comfortable with the submission process.

The exam will consist of both multiple choice and coding questions. We will cover the following topics:

  • Runtime complexity analysis

    • understand and be able to apply the Big-O notation

    • be able to analyze the worst-case runtime complexity of simple programs / algorithms

    • know the runtime complexity of common operations for a particular implementation of the ADTs discussed in class

  • Lists

    • understand implementations of list operations

      • array-backed lists

      • linked-lists

    • be able to use lists for a particular purpose

  • Maps

    • understand the Python dictionary data structure and be able to use it to solve computational problems

  • Hashtables

    • understand hashtables

    • understand the problem caused by collisions and solutions for that:

      • chaining

      • open addressing (linear probing)

  • Stacks & Queues

    • understand the stack and queue ADTs and how to implement them efficiently with array-backed or linked lists

  • Priority Queues

    • understand the priority queue ADT

    • understand heaps and how to implement them on top of arrays

  • Search

    • understand and be able to implement binary search and linear search

  • Python

    • be able to write simple programs in python that utilize build-in data structures and utility functions

    • be able to comprehend Python programs and be able to reason about their execution

Solutions from previous years

These are solutions from previous years.