0% found this document useful (0 votes)
15 views2 pages

Data Structure Reviewer

The document provides an overview of graph representation, including definitions of graphs, digraphs, weighted graphs, and adjacency matrix and list. It also discusses sorting algorithms such as Bubble Sort, Selection Sort, Insertion Sort, Shell Sort, and Merge Sort, along with an introduction to machine learning and its relationship to artificial intelligence. Additionally, it explains the concept of machine learning models as outputs generated from training algorithms with data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Data Structure Reviewer

The document provides an overview of graph representation, including definitions of graphs, digraphs, weighted graphs, and adjacency matrix and list. It also discusses sorting algorithms such as Bubble Sort, Selection Sort, Insertion Sort, Shell Sort, and Merge Sort, along with an introduction to machine learning and its relationship to artificial intelligence. Additionally, it explains the concept of machine learning models as outputs generated from training algorithms with data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Data Structure Reviewer Graph Representation

Graphs Adjacency matrix is a square matrix with dimensions


equivalent to the number of vertices in the graph. It is
Graph - consists of a set of vertices (or nodes) and a set
used to indicate whether pairs of vertices are adjacent
of edges (relations) between the pairs of vertices.
or not.

Digraph (directed graph) consists of edges each


connected to a single vertex. Directed edges are lines Adjacency list uses an array of lists to represent a
with an arrow on one (1) end. graph. There is one (1) list for each vertex.

Weighted graph consists of edges that are associated


with values.

Vertex is adjacent to another vertex if there is an edge


to it from that other vertex.

Example Java Syntax Code:

Degree of a vertex is the number of edges which has


that vertex as an endpoint.
Sorting Algorithms Introduction to Machine Learning

Sorting is the process of arranging data in a specific Artificial intelligence is the science of training machines
order. to perform human tasks.

Bubble Sort – Every pair of adjacent items is compared


and items are swapped until they are in order.

Machine learning is a form of artificial intelligence that


enables a system to learn from data, identify patterns,
and make decisions with minimal human intervention.
Selection Sort – The smallest unsorted item is chosen
and then swapped with the item in the next position to
be filled.

Insertion Sort – The comparison applies to adjacent


items and previously scanned items. Machine learning model is the output generated when
you train your machine learning algorithm with data.
(Hurwitz, 2018).

Machine Learning Models

Shell Sort – Items at a specific interval are sorted. The


interval between the items is gradually decreasing
based on a sequence.

Merge Sort – The list is divided into sorted sub-lists


then combined into a single sorted list.

You might also like