Code Monkey home page Code Monkey logo

basic_dsa_cpp's Introduction

Welcome to the Data Structures and Algorithms repository! This repository contains a collection of basic algorithms and data structures implemented in C++. Whether you are a beginner looking to learn the fundamentals of algorithms or an experienced developer brushing up on your skills, this repository has something for everyone.

Table of Contents

Introduction

This repository serves as a collection of C++ implementations of essential data structures and algorithms. Whether you're a beginner learning DSA or an experienced developer looking for reference implementations, you'll find code snippets here to help you.

Directory Structure

The repository is organized into different folders based on the type of data structure or algorithm. Here's a brief overview of the directory structure:

  • /BST: Code for binary search tree data structure and algorithms.
  • /Backtracking: Questions related to backtracking algorithm.
  • /Miscellaneous: Miscellaneous algorithms and data structures.
  • /dp: Solutions to problems using dynamic programming.
  • /graph: Graph data structures and algorithms.
  • /heap: Heap data structures and algorithms.
  • /linkedList: Implementation of linked list data structures.
  • /queue: Implementation of queue data structure.
  • /searching: Code for searching algorithms such as binary search.
  • /segmentTrees: Implementation of segment trees and questions.
  • /sorting: Various sorting algorithms like bubble sort, quicksort, mergesort, etc.
  • /stack: Implementation of stack and some questions.
  • /tree: Binary trees, AVL trees, and other tree-based structures.
  • /trie: Implementation of trie data structure and a few questions including Huffman Encoder.

Feel free to explore each directory for specific implementations.

How to Use

  1. Clone the repository to your local machine:

    git clone https://github.com/Cgarg9/basic_dsa_cpp.git
    

Navigate to the directory of the specific data structure or algorithm you are interested in. Open the C++ file in your preferred editor or IDE. Compile and run the code.

Feel free to modify and integrate the code into your projects or use it for educational purposes.

Contributing

If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. Make sure to follow the contributing guidelines.

basic_dsa_cpp's People

Contributors

cgarg9 avatar kshku avatar modernbeast02 avatar

Watchers

 avatar

basic_dsa_cpp's Issues

first occurence

Write a code to find the index of the first occurrence of a number in a sorted array. Use binary search to implement this. Handle the case where the element doesn't exist.
Add this file to the searching folder and name it "firstOccurence.cpp"

previous greater element

For all elements of an array find the previous greater element. Implement using a stack. If no greater element exists then previous greater element is -1.

Binary Search

Create a file in the searching folder and name is binarySearch.cpp. Write the binary search code where you search a vector given the vector and the element. Handle the case where the element does not exist.

heapSort

Implement the heapSort algorithm in cpp.

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.