- To compile use
gcc main.c -o main
- To execute use
./main
In computer programming, a matrix can be defined with a 2-dimensional array. Any array with 'm' columns and 'n' rows represent a m X n matrix. There may be a situation in which a matrix contains more number of ZERO values than NON-ZERO values. Such matrix is known as sparse matrix.
- To compile use
gcc main.c -o main
- To execute use
./main
The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most valuable items.
- To compile use
gcc main.c palavra.c texto.c bbt.c -o main
- To execute use
./main
Practical work 3 is based on three main data structures: word, text, and library. A word is composed of characters, a text is composed of words, and a library is composed of texts, each of which is structured. developed with linked lists and array. The objective of this work is to create a random word generation algorithm and thus sort a text in alphabetical order and a library from the number of words each text has.
- The group chose to implement the Select Sort, Quick Sort, Merge Sort, and Heap Sort algorithms for both text and library with array.
- The group tried to implement the Select Sort, Quick Sort, Merge Sort, and Insert Sort algorithms for both text and library with linked lists.
Selection Sort
Quick Sort
Merge Sort
Heap Sort
Insertion Sort






