COMP1511 Exam Prep Problems & Solutions

CSESoc and UNSW WIT have partnered up to create practice problems to help you prepare for your COMP1511 final exam! This website shows a selection of those problems for which we have written sample solutions.

You can find the original problem sets at these Hackerrank pages. To access and attempt the problems, just make a Hackerrank account and sign up to the Hackerrank pages.

Standard Problem Set (26 problems): https://www.hackerrank.com/comp1511-exam-prep-n-chill

Mini Competition Problem Set (7 problems): https://www.hackerrank.com/comp1511-exam-prep-n-chill-competition

The problem sets and this website will stay up indefinitely, feel free to come back and practice whenever you have time!

We've written solutions with explanations and sample code for each question. In this guide, each question is broken into three parts:

  • Problem: The problem statement you see on HackerRank, including sample input/outputs.
  • Approach: A high-level overview of how we'd approach the question, with explanations and sample code.
  • Sample Code: The full sample code for the problem, which you can compile with gcc/dcc and run yourself.

Note that there are quite a lot of problems in total and many of them are quite involved, so you are not realistically expected to complete all of them. These problems are also NOT an accurate indication of what the COMP1511 exam will be like, be sure to check out your prescribed COMP1511 practice resources for a better indication of the style of questions in your exam. Nevertheless, attempting these questions will help you revise COMP1511 concepts and practice C coding.

We hope you find this resource useful, and we wish you luck for your exams!

—CSESoc and UNSW WIT