Skip to content

Latest commit

 

History

History

sort-list

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

MergeSort

Finding the middle of a linked list

fast-slow pointer.

  1. fast runner goes 2 steps each time
  2. slow runner goes 1 step
  3. when fast reach the end of the linked list, the slow id the middle of the list