DATA STRUCTURE AND ALGORITHMS
University of KwaZulu-Natal (UKZN)
All 14 results
Sort by
-
(Arrays)
- Class notes • 17 pages • 2023
-
- R350,00
- + learn more
A list of finite number of homogenous data elements 
• Data elements could be 
 
§ Characters 
§ Numbers 
§ Structures 
 
Note!: After compilation, elements of array are stored in successive 
memory location 
 
Exception: User defined higher dimensional arrays
-
Broad classification
- Class notes • 9 pages • 2023
-
- R165,00
- + learn more
Input: Zero or more quantities are externally supplied 
• Output: At least one quantity is produced 
• Definiteness: Instructions has to be clear & unambiguous 
• Finiteness: Algorithm must always terminate after a finite set of 
instructions
-
(C - Structures)
- Class notes • 7 pages • 2023
-
- R168,00
- + learn more
The slides that follow present a basic introduction to C - structures that we will 
need in order to understand fundamental data structures. 
• Arrays allow us to define types of variables that can hold several data items of the 
same kind. 
• In contrast, structure is an example of user defined data type available in C that allows us to combine data items of different kinds. 
• Structures are used to represent a record. Suppose we want to keep track of our 
books in a library. We might wa...
-
(Introduction to algorithm complexity)
- Class notes • 6 pages • 2023
-
- R160,00
- + learn more
The study of data structures includes: 
• Logical description of the data structure 
• Implementation of the data structure 
• Quantitative analysis of the data structure 
Includes determining: 
- Amount of memory needed to store the data structure 
- Time required to process
-
(Review on basics of C-language)
- Class notes • 20 pages • 2023
-
- R120,00
- + learn more
// 
// main.c 
// Testing Filter 
// 
// Copyright © 2016 James Okello. All rights reserved. 
 
#include <stdio.h> 
#include "test_c_filter.h" 
 
int main(int argc, const char * argv[]) { 
// insert variables & code here... 
printf("Hello, World!n"); 
test_filter_parameters(); // prototype of this function in header file 
return 0; // return a value if necessary
-
(Graphs & Sample Algorithm)
- Class notes • 22 pages • 2023
-
- R162,00
- + learn more
Given some vector v, it possible to create a number 
(or a set) of vectors that when linearly combined will 
give any vector of a type similar to v 
 
§ Similarly, given a graph, it is possible to create sub- 
graphs that together they define the original graph 
 
ü Note that a graph is constituted of vertices and 
edges
Consider 
const int result = 10; 
 
Trying to change value of result by assigning result to a different value 
WRONG: result += 30;
-
(Revisit the big “O”)
- Class notes • 19 pages • 2023
-
- R162,00
- + learn more
Given 
• a matrix variable “matrixA” of type double and size N-by-M (N 
rows and M columns) 
• a vector variable “vectorB” of type double and size M-by-1 
 
Assume the variables vectorB, vectorC and matrixA have been declared 
 
#define SIZE_N 20 
#define SIZE_M 10 
: 
double matrixA[SIZE_N][SIZE_M], vectorB[SIZE_M], vectorC[SIZE_N];
-
(Queues)
- Class notes • 34 pages • 2023
-
- R162,00
- + learn more
The first item in the queue is the first to be served. 
• A queue is a First-In-First-Out (FIFO) structure 
• Also considered as a First-Come-First-Served (FCFS) structure 
• Is a special kind of list in which the basic insert and delete operations 
are restricted to the ends of the list. 
• Items are removed from a queue at one end, called front (head) of the 
queue, and elements are added only at the other end called back (rear 
or tail).
-
(Queues)
- Class notes • 34 pages • 2023
-
- R162,00
- + learn more
The first item in the queue is the first to be served. 
• A queue is a First-In-First-Out (FIFO) structure 
• Also considered as a First-Come-First-Served (FCFS) structure 
• Is a special kind of list in which the basic insert and delete operations 
are restricted to the ends of the list. 
• Items are removed from a queue at one end, called front (head) of the 
queue, and elements are added only at the other end called back (rear 
or tail).
Did you know that on average a seller on Stuvia earns R4500 per month selling summaries? Hmm, hint, hint. Discover all about earning on Stuvia