GoConqr has a new look! Let us know what you think.

Notes

Data Structures 2019.01.24

Ryan Monaghan Data Structures English 1 page

Content of the notes (1)

Page 1

Begin at Slide 24 from Chapter00.pdf

Linked Chain of Nodes or Singly Linked List:

We need to know the beginning which is pointed by the head pointer

See in class code

Vectors:

Vectors can be thought of arrays that can grow (and shrink) in length while your program is running.

Declare a variable v for a vector with base type int: vector v;

The vector definition is given in the library vector, which placed it in the std namespace.

When we want to use vectors, we should include the following: #include using namespace std;

How to get size of array:

int arr[] = {1,3,5,9}

int size = sizeof(arr)

How to get size of vector:

myvector.size();

myvectory(1) How to access an element in a vector

myvectory.at(1) or you can use this one

Information

Description
Data Structures (Data Structs) Note on Data Structures 2019.01.24, created by Ryan Monaghan on 24/01/2019.
Created by
Ryan Monaghan
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?