Sorting

Sorting algorithms:

  • Bubble sort
  • Selection sort
  • Insertion sort
  • Merge sort
  • Quick sort

Intervals

You are given a list of intervals

(a) Check if there exists a pair of intervals such that one is contained in the other.

(b) Check if there exists a pair of intervals which intersect.

-th smallest element

Given a list of integers, find the -th smallest element in it.