Skip to content

Latest commit

 

History

History
88 lines (63 loc) · 4.41 KB

README.md

File metadata and controls

88 lines (63 loc) · 4.41 KB

Data Structures

This repository contains all the C programs that I have executed for my Data Structures Course in my 2nd Year of Computer Science Undergrad program at Dayananda Sagar University, Bengaluru, India in Q4 2021.

List of Programs

Serial No. C File Name Description
1 1_ArithmeticOperations.c A C program to calculate addition, subtraction, multiplication and division of two numbers.
2 2_SumAndReverse.c A C program to find the sum of digits of a number and reverse the number.
3 3_MatrixAddition.c A C program to add two matrices.
4 4_MatrixMultiplication.c A C program to multiply two matrices.
5 5_LandBSearch.c A C program to search an element in a 2D array using Linear Search and Binary Search algorithms.
6 6_InfixPrefix.c A C program to convert an Infix expression to Prefix expression.
7 7_InfixPostfix.c A C program to convert an Infix expression to Postfix expression.
8 8_StackArrays.c A C program to implement a Stack using Arrays.
9 9_QueueArrays.c A C program to implement a Queue using Arrays.
10 10_PostfixEval.c A C program to evaluate a Postfix expression.
11 StackLL.c A C program to implement a Stack using Linked Lists.
12 12_QueueLL.c A C program to implement a Queue using Linked Lists.
13 13_TowerOfHanoi.c A C program to solve the Tower of Hanoi problem using recursion.
14 14_PolynomialEval.c A C program to evaluate a Polynomial expression.
15 15_BST.c A C program to search for a key element given a Binary Search Tree.
16 16_GraphTraversal.c A C program to traverse a Graph using Breadth First Search and Depth First Search algorithms.
17 17_FileOperations.c A C program to perform File Operations.

How to Run

  1. Ensure that you have a C compiler installed on your system.

    gcc --version

    It should look something like this GCC Version

    If you don't have a C compiler installed, you can download one from here or using your package manager.

    Examples:

    • Ubuntu -
    sudo apt install gcc
    • Arch Linux -
    sudo pacman -S gcc
    • macOS -
    brew install gcc

    Additionaly, if you are using Windows, follow the steps specified here.

  2. Clone the repository using the following command:

    gh repo clone rexgraystone/dataStructures

    or

    git clone https://github.com/rexgraystone/dataStructures.git
  3. Change the directory to the cloned repository:

    cd dataStructures
  4. Compile the C program using the following command:

    gcc <C File Name> -o <Output File Name>
  5. Run the program using the following command:

    ./<Output File Name>