Skip to content

sajadshafi/data-structures-and-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms

Introduction

Data Structures and Algorithms are fundamental building blocks of computer science and are used to design efficient solutions for various computational problems. Data Structures are used to organize and store data in a way that makes it easily accessible and modifiable, while algorithms are a set of instructions used to solve specific problems or accomplish specific tasks. Together, data structures and algorithms form the backbone of computer science and are essential for understanding how to design and analyze efficient solutions for a wide range of computational problems.

About the repository

This repository contains various data structures and algorithms in implemented in C#. The goal of this repository is to provide a solid understanding of common data structures and algorithms, as well as their time and space complexity. This repository will be updated with every topic that I learn.

Usage

To use the code in this repository, you will need to have dotnet core installed on your machine. Simply clone the repository by writing the below command:

git clone https://github.com/sajadshafi/data-structures-and-algorithms.git
cd data-structures-and-algorithms

Table of content

Arrays

An array is a basic data structure that stores a collection of elements, all of the same type, in a contiguous block of memory. Each element in an array is identified by a unique index, which is an integer value starting from 0 in most of the programming languages but in some other programming languages the that index can start from 1 like in Python. Arrays allow for efficient access, insertion, and deletion of elements at specific indices.

Array operations are:
  1. Insertion

    • Insertion at beginning
    • Insertion at end
    • Insertion at middle
  2. Deletion

    • Deletion at beginning
    • Deletion at end
    • Deletion at middle
  3. Sorting

    • Selection Sort
    • Insertion Sort
    • Merge Sort
    • Quick Sort

Linked List

//Properties Node head; Node tail int _size; int Count => _size;

1 - Append(Node node)

2 - Prepend(Node node)

3 - Insert(int index, Node node)

4 - RemoveFirst()

5 - RemoveLast()

6 - Remove(Node node)

7 - RemoveAt(int index)

7 - Find(int index)

7 - Any(int index)

9 - RemoveAt(int index)

10 - TraverseList()

//TODO:

8 - Get(int index)

8 - Set(int index, Node node)

About

Data structure and algorithms learning process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages