Skip to content

This repository contains a comprehensive collection of C++ programs focused on Data Structures and Algorithms (DSA). The programs are categorized by various topics, making it easy to explore and understand each concept. It serves as a valuable resource for learning and practicing DSA.

Notifications You must be signed in to change notification settings

YashChavanWeb/DSA_Complete_Notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complete DSA C++ Notes

This repository contains various programs organized by topics. Below is a list of topics and corresponding files for each section.


Table of Contents

  1. Basics
  2. STL
  3. Basic Maths
  4. Recursion
  5. Hashing & Maps
  6. Sorting Techniques
  7. Arrays
  8. Binary Search
  9. Strings
  10. Linked List
  11. Stack and Queue

Basics

This folder covers the fundamental concepts of programming.


STL (Standard Template Library)

Programs related to the Standard Template Library (STL) in C++.


Basic Maths

This folder contains basic mathematical concepts implemented in C++.


Recursion

Programs demonstrating the power of recursion.


Hashing & Maps

Hashing techniques and map implementations in C++.


Sorting Techniques

Implementation of various sorting algorithms.


Arrays in C++

Basic Array Operations

Array Rotation and Manipulation

Search Algorithms

Special Problems and Techniques

Sorting and Rearrangement

Advanced Array Algorithms

Array Rearrangement and Permutations

Sequence and Matrix Problems

Subarray Problems


Binary Search

This folder contains key Binary Search concepts and their C++ implementations:

Basic Problems

Searching

Find element

Binary search on Answers


Strings

This folder contains key String Problems and their C++ implementations:


Here’s the properly formatted and structured version of your Linked List problems with the corresponding C++ implementations:


Linked List

This folder contains key Linked List problems and their corresponding C++ implementations.

  1. 01_linked_list_basics.cpp: Implements the basics of linked lists.
  2. 02_deletion_of_node_SLL.cpp: Demonstrates the deletion of a node in a Singly Linked List (SLL).
  3. 03_insertion_of_node_SLL.cpp: Demonstrates the insertion of a node in a Singly Linked List (SLL).
  4. 04_doubly_linked_list_basics.cpp: Implements the basics of Doubly Linked Lists (DLL).
  5. 05_deletion_of_node_DLL.cpp: Demonstrates the deletion of a node in a Doubly Linked List (DLL).
  6. 06_insertion_of_node_DLL.cpp: Demonstrates the insertion of a node in a Doubly Linked List (DLL).
  7. 07_reverse_a_DLL.cpp: Demonstrates reversing a Doubly Linked List (DLL).
  8. 08_add_two_nos_in_LL.cpp: Demonstrates adding two linked lists.
  9. 09_group_odd_and_even.cpp: Demonstrates grouping the linked lists based on even and odd indexes.
  10. 10_sort_LL_of_0s_1s_2s.cpp: Demonstrates sorting of linked lists with 0s, 1s, and 2s.
  11. 11_remove_nth_node_from_end.cpp: Demonstrates removing the nth node from the end of the linked list.
  12. 12_reverse_a_Linked_List.cpp: Demonstrates reversing a linked list.
  13. 13_find_the_middle_of_LL.cpp: Demonstrates finding the middle of a linked list.
  14. 14_check_if_LL_palindrome_or_not.cpp: Demonstrates checking if a linked list is a palindrome.
  15. 15_adding_1_to_given_LL.cpp: Demonstrates adding 1 to a given linked list.
  16. 16_intersection_pt_of_Y_LL.cpp: To find the intersection point of a Y Linked List.
  17. 17_detect_a_loop_in_LL.cpp: To detect a loop/cycle in a Linked List.
  18. 18_find_length_of_loop_in_LL.cpp: To find length of the loop in LL.
  19. 19_delete_middle_node.cpp: To detect the middle node in LL.
  20. 20_find_starting_point_of_loop.cpp: To find starting point of the loop/cycle in LL.
  21. 21_merge_two_sorted_LL.cpp.cpp: To merge two sorted Linked Lists.
  22. 22_sort_a_LL.cpp: To Sort a Linked List.
  23. 23_del_occurences_of_key_in_DLL.cpp: Delete the occurrences of a key in a Doubly Linked List.
  24. 24_find_pairs_with_given_sum_DLL.cpp: To find the pairs in DLL for the given sum.
  25. 25_remove_dupli_from_sorted_DLL.cpp: Remove duplicate from the sorted Doubly Linked List (DLL)
  26. 26_rotate_a_LL_k_times.cpp: Rotate a Linked List by k times.

Stack and Queue

  1. intro_to_stack_and_queue.cpp: Introduction to Stacks and Queues — basic concepts and operations.
  2. stack_queue_using_LL.cpp: Implement stack and queue using a linked list.
  3. stack_and_queue_using_both.cpp: Implement stack and queue using both arrays and linked lists.
  4. balanced_parentheses.cpp: Check if parentheses in an expression are balanced using a stack.
  5. prefix_infix_postfix.cpp: Convert between prefix, infix, and postfix notation using stacks.
  6. implement_min_stack.cpp: Implement a stack that supports the getMin() operation in constant time.
  7. 07_next_greater_element.cpp: Find the next greater element in the given array (Monotonic stack).
  8. 08_next_cir_greater_element.cpp: Find the next greater element in the given array using circular array.
  9. 09_previous_smaller_element.cpp: Find the previous smaller element for all elements in the array.
  10. 10_sum_of_subarray_mins.cpp: Find the sum of subarray minimums of the array.
  11. 11_sum_of_subarray_ranges.cpp: Find the sum of subarray ranges (subarray_max - subarray_min) of the array.
  12. 12_aestorid_collisions.cpp: Find the result array after the Asteroid Collisions.
  13. 13_largest_rect_in_histogram.cpp: FInd the largest rectangle in Histogram.
  14. 14_maximal_rectangle.cpp: FInd the maximal rectangle in a 2D Matrix.
  15. 15_remove_k_digits.cpp: Remove k digits from the given string.
  16. 16_stock_and_span_problem.cpp: Stock and span problem in stack.

How to Use

  1. Clone the repository using the following command:

    git clone https://github.com/YashChavanWeb/DSA_Complete_Notes
  2. Navigate to the folder of interest:

    cd Programs/<Folder_Name>
  3. Compile and run the C++ files:

    g++ <filename.cpp> -o <output_name>
    ./<output_name>
  4. Enjoy exploring the programs and learning the concepts!


Contributing

Feel free to fork the repository, make changes, and create a pull request if you have improvements or additional programs to share.

About

This repository contains a comprehensive collection of C++ programs focused on Data Structures and Algorithms (DSA). The programs are categorized by various topics, making it easy to explore and understand each concept. It serves as a valuable resource for learning and practicing DSA.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages