Skip to main content
Logo image

Section 27.13 Sort Linked Lists

In this final video on linked lists we’ll explore how to create a sorted copy of a linked list, using the insertion sort algorithm.

If you cannot see this codecast, please click here.

Check Your Understanding Check Your Understanding

1.

    We’ll learn about libraries next! You have already seen some libraries, amongst them the mathematics library math.
    Please explore some of the functions in the standard C math library (you’ll need to search the internet). In particular, what is the difference between the two functions atan() and atan2()?
  • Both find the inverse tangent, but atan2() is able to place it into the correct quadrant.
  • Correct
  • Both find the inverse tangent, but atan2() squares the result.
  • Not quite. Try again!
  • Both find the inverse tangent, but one is in radians, the other in degrees.
  • Not quite. Try again!
  • Both find the inverse tangent, but atan2() first multiplies by 2.
  • Not quite. Try again!