A data structure is a particular way storing and organizing data in a computer for efficient access and modification. Data structures are designed for a specific purpose. Examples include arrays, linked lists, and classes.\
B tree
binary tree
Graph
Hash table
Matrix Chain Multiplication Dynamic Programming
peaks in matrix
Propose an algorithm of searching for a key in a tree B of order n.
We give a text, the text is a sequence of sentences and a sentence is a sequence of words separated by (,.:;-)
The words are possibly repeated and we want to display each word of the text with its frequency.
Question: how to display the words in alphabetical order?
Implement in C:
• The DFS recursive path.
• The BFS recursive path.
Here, the treatment of vertices is the display.
Hint: if possible, display a menu with operations.
Example :
hand(){
create a graph
display menu()
}
menu:
1- add a vertex.
2- add a bow.
3-delete a vertex.
4-remove an arc.
5-course in depth.
6-course in width.
7-leave.
A choice :
- the graph G can be directed or not.
- G can be represented either by an adjacent list or by a matrix adjacent.
We give a text, the text is a sequence of sentences and a sentence is a sequence of words separated by (,.:;-)
The words are possibly repeated and we want to display each word of the text with its frequency.
Question: how to display the words in alphabetical order?
N.B: the 4th task is just to answer the question asked.
Using dynamic programming.
Implement the chained product of n matrices and display the solution (with its parenthesis) and its cost.
1- Look for a peak in a matrix and apply the "divide and conquer" practice.
2- Search all the peaks (either with the 1st question or with another method).