Data Structure

Completed time: March, 2020
Language: C

  1. Contact Management System /contactsLinkedList.cpp/
    The system implements the linked list structure to achieve the functions of inserting, querying, deleting, updating, and outputting. Querying is the basic operation for other operations, and key is unique in the system to accommodate the querying operation.
  2. Josephus Problem /JosephusProblem/
    Implement Josephus Problem using two storage methods: 1) sequential storage structure 2) linked storage structure
  3. Priority Queue /priorityQueue.cpp/
    Implement priority queue using binary heap by sequential storage structure. To accommodate the calling of the function in the future applications, the interface should be as general as possible.
  4. Binary Tree /binaryTree.cpp/
    Implement the basic operations of binary tree by mainly using non-recursive methods, including establishing, pre-order traversal(hard), in-order traversal(hard), post-order traversal(hard), finding the path given a node.
    Using non-recursive methods means simulating the calling of functions done by the computer by using stack. Thus, firstly implement the basic operations of stack.
  5. Graph /Graph/
    Implement two important algorithm Floyd-Warshall algorithm and Dijkstra's algorithm. To lower down the complexity of two algorithms, use the adjacency matrix to store the graph.
    There are two implementation methods of Dijkstra's algorithm: using the priority queue or the usual array. Two implementation methods are included. (3. priority queue) is called to implement this. All .cpp files are connected by .h files. You can directly run main.cpp file to test the project.