Code Monkey home page Code Monkey logo

complete_data_structure_and_algorithms_for_placement's Introduction

Data Structures and Algorithms Repository

Welcome to my Data Structures and Algorithms repository, where I implement and explore various algorithms and data structures in C++. This repository is designed to provide a comprehensive collection of algorithms and data structures, along with their time and space complexities, to help developers and students learn and practice.

Table of Contents

  • Data Structures
  • Algorithms

Data Structures

Arrays

  • Time Complexity: O(1) for access, O(n) for search
  • Space Complexity: O(n)

Strings

  • Time Complexity: O(n) for search, O(n) for manipulation
  • Space Complexity: O(n)

Linked Lists

  • Time Complexity: O(n) for search, O(1) for insertion/deletion
  • Space Complexity: O(n)

Stacks

  • Time Complexity: O(1) for push/pop, O(n) for search
  • Space Complexity: O(n)

Queues

  • Time Complexity: O(1) for enqueue/dequeue, O(n) for search
  • Space Complexity: O(n)

Trees

Tree Types

Perfect Tree (P)
  • Time Complexity: O(log n) for search, O(n) for insertion/deletion
  • Space Complexity: O(n)
  • Applications: Database indexing, File systems, Compilers
  • Example: File system hierarchy
Complete Tree (C)
  • Time Complexity: O(log n) for search, O(n) for insertion/deletion
  • Space Complexity: O(n)
  • Applications: Heap data structure, Priority queues, Scheduling algorithms
  • Example: Heap data structure
Balanced Binary Tree (B)
  • Time Complexity: O(log n) for search, O(log n) for insertion/deletion
  • Space Complexity: O(n)
  • Applications: Database indexing, File systems, Compilers
  • Example: B-tree index
Full Binary Tree (F)
  • Time Complexity: O(log n) for search, O(n) for insertion/deletion
  • Space Complexity: O(n)
  • Applications: Expression trees, Syntax trees, Decision trees
  • Example: Expression tree
Degenerate Tree (D)
  • Time Complexity: O(n) for search, O(n) for insertion/deletion
  • Space Complexity: O(n)
  • Applications: Linked lists, Stacks and queues, Recursive algorithms
  • Example: Linked list

Graphs

  • Time Complexity: O(n) for search, O(n) for traversal
  • Space Complexity: O(n)

Algorithms

Sorting

Bubble Sort

  • Time Complexity: O(n^2)
  • Space Complexity: O(1)

Selection Sort

  • Time Complexity: O(n^2)
  • Space Complexity: O(1)

Insertion Sort

  • Time Complexity: O(n^2)
  • Space Complexity: O(1)

Merge Sort

  • Time Complexity: O(n log n)
  • Space Complexity: O(n)

Quick Sort

  • Time Complexity: O(n log n)
  • Space Complexity: O(n)

Searching

Linear Search

  • Time Complexity: O(n)
  • Space Complexity: O(1)

Binary Search

  • Time Complexity: O(log n)
  • Space Complexity: O(1)

Graph Algorithms

Breadth-First Search (BFS)

  • Time Complexity: O(n + m)
  • Space Complexity: O(n)

Depth-First Search (DFS)

  • Time Complexity: O(n + m)
  • Space Complexity: O(n)

Dijkstra's Algorithm

  • Time Complexity: O(n log n + m)
  • Space Complexity: O(n)

Floyd-Warshall Algorithm

  • Time Complexity: O(n^3)
  • Space Complexity: O(n^2)

Topological Sort

  • Time Complexity: O(n + m)
  • Space Complexity: O(n)

Dynamic Programming

Fibonacci Series

  • Time Complexity: O(n)
  • Space Complexity: O(n)

License

This repository is licensed under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! If you'd like to contribute to this repository, please fork the repository and submit a pull request.

Acknowledgments

  • Ashutosh kumar for creating and maintaining this repository.

complete_data_structure_and_algorithms_for_placement's People

Contributors

ashukr321 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.