[go: up one dir, main page]

0% found this document useful (0 votes)
4 views1 page

Data Structure

Uploaded by

dawire3808
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Data Structure

Uploaded by

dawire3808
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Class: Computer Science 101

Date: 10/25/23

Topic: Data Structures

What are they? Ways to organize and store data to be used efficiently.

Arrays:

Ordered collection of elements of the same data type.

Stored in contiguous memory locations.

Fast access to elements using an index (O(1)).

Adding/deleting elements can be slow (O(n)).

Linked Lists:

A sequence of nodes, where each node contains data and a pointer to the next node.

Can be single, double, or circular.

Adding/deleting is fast (O(1)), but access can be slow (O(n)).

Stacks:

A Last-In, First-Out (LIFO) data structure.

Operations: push (add to top), pop (remove from top).

Think of a stack of plates.

Queues:

A First-In, First-Out (FIFO) data structure.

Operations: enqueue (add to back), dequeue (remove from front).

Think of a line at a store.

You might also like