answer:

a. The inner loop has N iterations for every iteration of the outer loop. There are N iterations of the outer loop. So overall we have

O(N2).

b. Sorting with general elements uses O(N log N). Comparing two lists of N elements requires O(N). Thus overall we have

2c N log N + d N

which is

O(N log N)

c. Building a hash table under the stated assumptions is O(N). Finding out if an element is in the other set is O(1) and we must do this N times, so overall:

O(N)