Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Subject: PRF192- PFC

Workshop 03 (40 minutes)

Note: Name your file in the following format: WS3_<your name>_<your student code>.zip
and upload to on time

The zip file contains:

Mark
Question E1 E2

MAX 5 5

1. (5 marks) Given a set A with n elements numbered 1, 2, …, n. A permutation of A is a


sequence a1, a2, … , an. where (a.i) belongs to A and they are different. Write a function
that generates all permutations of the set A.

2. (5 marks) Given a linked list; write a function to check if a linked list has a ring or not?

You might also like