100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Extreme summary of all data structures covered in CSC2001F

Rating
5.0
(1)
Sold
-
Pages
1
Uploaded on
24-01-2022
Written in
2021/2022

A table of all data structures and their type, definition, properties, advantages, disadvantages, applications in the world and time complexity.

Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
January 24, 2022
Number of pages
1
Written in
2021/2022
Type
Summary

Subjects

Content preview

Tree Type Definition Properties Advantages Disadvantages Applications Time complexities
Set of node and set of
directed edges that
Tree does not have cycles
Yes/ no decision making O(n) in the best,
process worst and average
An example of a data 1. Non-linear DS have more case. O(n) means
structure that is made efficient operations. that the running
Binary Tree time increases as
of linked nodes and is 2. Each node has a maximum of
non-linear two children the size of the
input increases.
n = the input size

1. Nodes must be comparable. Best case: O(1)
Lots of work
2. Nodes in the left subtree of a Average Case:
A binary tree with involved to
Binary Search Tree particular node < particular node. Fast search Any ordering of data O(h), which is
aditional properties add/ remove
3. Nodes in right subtree of a O(logn)
nodes
patricular node > particular node Worst case: O(n)
AVL trees are mostly used
for in-memory sorts of sets
Whatever the worst case and dictionaries. AVL trees
is, the tree is still are also used extensively in
Adding/
1. Every node must be balanced. balanced. Nodes are database applications in Worst case and
A BST with additional Removing
AVL Tree Height of left and right subtrees distributed to a larger average: O(log2n)
balancing properties nodes requires which insertions and
must differ by at most 1 degree. deletions are fewer but For space its O(n)
extra work
:. Tree height is SHORTER there are frequent lookups
:. Operations are FASTER for data required.


1. Every node is associated with a
colour
2. Every leaf nil is black
3. Root nodes are black
4. Every node inserted is red
5. Every inserted node is red
Weaker
6. If parent of new node is black,
balance All operations in
then exit. Fast insertions and
A BST with additional conditions than Good for schedulers, maps Best, average and
Red Black Tree 7. If parent of new node is red, retreivals. Same adv as
balancing properties AVL tree. One and sets. worst case take
then check the colour of the AVL tree.
bit per node for O(logn) time
parent's sibling of new node:
colour
a) If color is black or null then do
suitable rotation and recolour.
b) If colour is red then recolour and
check is parent's parent of new
node is not root node, then
recolour and recheck.

1. Limited in
Array is a limited size. Faster than
Data structures where 1. Array does not need to size (based on
a BST
items are stored in a be searched through arrays)
Item -> Index. Takes a particular
location determined by when the user searches 2. Can be
Hash Table item and computes the index in O(1) for all
their content. Content 2. In turn, this makes It resized but
the array that is associated with
based index rather than fast, efficient, should be
that item. Computes a location
comparison-based index inexpensive avoided.
where that item may be stored.
3. Hard to order

Doesn’t
Helps calculate the best account for
Hash Function 1 index an item should go hash(x) = x % table size order of input.
in Results in
collisions
Solves uniqueness
Hash Function 2 hash(x) = (((a)*37 + b) * 37 + c) problem by multiplying/
shifting each character by
some value
A class of algorithms.
We figure out the 1. Linear Probing: Inserting into
position the item should next position available
Open addressing
go into the array, but is 2. Quadratic probing: Avoids
not fixed. It is a first clustering of linear probing
guess

Chaining: Creates a structure n = items, m =
We find a position in attached to every position within table size
Closed Addressing the array and do not the array. Usually a linked list, Best Case: O(n/m)
deviate within the array. something with a table of pointers Average case: 1/2
and references x n/m
Worst case: O(n)

Reviews from verified buyers

Showing all reviews
3 year ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
chloewalt University of Cape Town
Follow You need to be logged in order to follow users or courses
Sold
24
Member since
3 year
Number of followers
12
Documents
36
Last sold
2 weeks ago

4.8

6 reviews

5
5
4
1
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions