$30 off During Our Annual Pro Sale. View Details »

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

Caren
June 02, 2019
630

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

Caren

June 02, 2019
Tweet

Transcript

  1. Linked Lists
    Week 4

    View Slide

  2. How was
    HackerRank?

    View Slide

  3. Confusions / common
    problems with Linked Lists?

    View Slide

  4. Linked List Tips and Tricks

    View Slide

  5. 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’

    View Slide

  6. Understand
    Match
    Pseudocode / Plan
    Implement
    Review
    Evaluate

    View Slide

  7. Understand
    Match
    Pseudocode / Plan
    Implement
    Review
    Evaluate

    View Slide

  8. Reverse Linked List
    Understand -> Match -> Plan -> Implement

    View Slide

  9. In class exercise
    Understand -> Match -> Plan -> Implement

    View Slide

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

    View Slide

  11. 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

    View Slide