Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CodePath SE102 - Linked List (Week II), Session 1

Caren
June 02, 2019
640

CodePath SE102 - Linked List (Week II), Session 1

Caren

June 02, 2019
Tweet

Transcript

  1. Linked List Tips and Tricks Take multiple passes through the

    linked list
 - get length 
 - save other information about contents Two pointers
 - ‘race car’ strategy with one regular pointer, and one fast pointer Dummy node
 - helpful for preventing errors when returning ‘head’
  2. In class exercise Understand -> Match -> Plan -> Implement

    Try to spend ~15 minutes on a problem
  3. In class exercise Understand -> Match -> Plan -> Implement

    Try to spend ~15 minutes on a problem Goal for each problem is to have it pass a simple test case