02_11_2008_Recitation_Guide

02_11_2008_Recitation_Guide - Recitation Guide for February...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Recitation Guide for February 11 th , 2008 I. Housing Keeping a. Bonus Homework 1 Due tonight. b. Homework 3 Due Friday February 15 th . c. Quiz 1 Average: 83 (including zeros) d. Exam 1 - Go over solutions. II. Linked list and homework 3 a. Linked Lists a dynamic data structure that stores information through nodes. Each node is a data structure itself that stores information and the next node that it references. Any given linked list is defined by its first node, typically known as the head. This first node has its data element and then points you to the next node. To find the last element in the list you need to start at the first node and traverse the list node by node until you hit the last element whose next node is null. b. Good real life example: Treasure map c. Advantages and disadvantages of Linked Lists i. Advantages 1. dynamic length can expand to fit more Objects. 2. Easier to insert in the beginning, middle and the end. ii. Disadvantages 1. dynamic length length is not as easily obtain compared to an array. 2. Not easy to index/traverse. 3. More complex conceptually than arrays d. Inserting and deleting in a simple linked list i. Create the first node, node1, whose data is A and next is null.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern