Git Product home page Git Product logo

shaik-sohail-72 / dsa Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 292 KB

This repository is my personal DSA playground, dedicated to self-improvement and skill enhancement. Through diverse coding challenges and detailed solutions, I aim to refine my Data Structures and Algorithms expertise. Join me in this journey of continuous learning and growth in the realm of computer science.

Java 100.00%
arrays bfs-dfs binary-search bitmanipulation dp graph greedy-algorithms hashing hashtable linked-list

dsa's Introduction

Data Structures and Algorithms Practice

Welcome to my Data Structures and Algorithms (DSA) practice repository! This repository was created as a personal project to enhance my DSA skills and understanding. It contains a collection of 218 different programs, algorithms, and problem-solving techniques that I've worked on over the past few months.

Purpose

The main purpose of this repository is to provide a structured way for me to learn, practice, and implement various DSA concepts. By working on these programs, I aim to deepen my understanding of fundamental data structures, algorithms, and problem-solving strategies. Each program listed here represents a learning milestone and a step forward in my DSA journey.

Programs List

Here are some of the programs I've implemented in this repository:

Bit Manipulation

  • Count set bits in an integer
  • Find the two non-repeating elements in an array
  • Find position of the only set bit
  • Count number of bits to be flipped to convert A to B
  • Power Set
  • Generate binary strings of 'k' size
  • Copy set bits in a range
  • Binary Gap
  • Prime Number of Set Bits in Binary Representation
  • Swap two numbers without using a temporary variable

Arrays

  • Contains Duplicate
  • Find whether an array is a subset of another array
  • Find the 'Kth' min element of an array
  • Find the 'Kth' max element of an array
  • Given an array which consists of only 0, 1, and 2. Sort the array.
  • Cyclically rotate an array by one
  • Union of two arrays
  • Intersection of two arrays
  • Move all the negative elements to one side of the array
  • Maximum-Subarray
  • Best time to Buy and Sell Stock
  • Maximum and Minimum Element in an Array
  • Rotate Array by 'K' times
  • Subsets
  • Subsets II
  • Single number
  • Bit Manipulation - Counting Bits and store in an array
  • Build Array from Permutation
  • Concatenation of Array
  • Running Sum of 1d Array
  • Find Common Elements In 3 Sorted Arrays
  • Kids With the Greatest Number of Candies
  • Count Common Words With One Occurrence
  • Math - Sign of the Product of an Array
  • Minimum number of jumps
  • Smallest subarray with sum greater than x
  • Minimum no. of operations required to make an array palindrome
  • Subarray with 0 sum
  • Find all pairs on an integer array whose sum is equal to a given number
  • Trapping Rain Water
  • Move Zeroes

Strings

  • Reverse words in a given string
  • To Lower Case
  • Reverse the string array
  • Check whether a String is Palindrome or not
  • Find Duplicate characters in a string
  • Valid Anagram
  • Bit Manipulation - Print all Subsequences of a string.
  • Group Anagrams
  • Split the Binary string into two substring with equal 0's and 1's
  • Write a Code to check whether one string is a rotation of another string
  • Count and Say problem
  • Find the second most repeated word in a string.
  • Number of flips to make a binary string alternate
  • Check if two given strings are isomorphic to each other
  • Convert a Sentence into its Equivalent Mobile Numeric Keypad Sequence
  • Jewels and Stones
  • Shuffle String

Linked List

  • Remove duplicates from an unsorted linked list
  • Remove Duplicates in a sorted Linked List
  • Reverse a linked list
  • Reverse a Linked List in groups of given size
  • Two Pointers - Detect Loop in linked list
  • Add 1 to a number represented as a linked list
  • Linked List Cycle II (Return the node where the cycle begins)
  • Intersection of two sorted Linked lists
  • Intersection Point in Y Shaped Linked Lists
  • Check If Circular Linked List
  • Split a Circular Linked List into two halves
  • Check if Linked List is Palindrome
  • Nth node from end of linked list
  • Segregate even and odd nodes in a Link List
  • Multiply two linked lists
  • Move the last element to the Front in a Linked List
  • Sort a linked list of 0s, 1s, or 2s
  • Linked List - DLL with Forward and Backward direction display

Graph

  • Creation of Graph Adjacency list (Array of ArrayList)
  • BFS - Implement BFS algorithm
  • DFS - Implement DFS algorithm
  • DFS - Detect Cycle in Undirected Graph
  • DFS - Detect Cycle in Directed Graph
  • DFS - Bridges - Tarjan's - Critical Connections in a Network
  • DFS - Tarjan's - Articulation Point
  • reverse DFS - Count Strongly connected Components(Kosaraju's Algo)
  • Distance from the Source (Bellman-Ford Algorithm)
  • Negative weight cycle (Bellman-Ford Algorithm)
  • BFS - Shortest path - Implementing Dijkstra Algorithm
  • BFS - prim's - Implement Prims Algorithm
  • Matrix - BFS - Flood Fill algo
  • Matrix - DFS - Number of Islands
  • Matrix - DFS - Search in a Maze
  • Matrix - BFS algo implementation
  • Matrix - DFS algo implementation
  • DFS - Count the paths from source to destination
  • DFS - Print all paths from source to destination
  • DFS - Cycle - Course Schedule
  • DFS - Cycle - Find Eventual Safe States

Trees

  • Binary Trees - Same Tree
  • Binary Tree - Postorder Traversal
  • Binary Tree - Preorder Traversal
  • Binary Tree - Inorder Traversal
  • Binary Tree - Maximum Depth or Height of Binary Tree
  • Binary Tree - Level Order Traversal
  • Count Complete Tree Nodes
  • Binary Tree - Reverse Level Order Traversal
  • Binary Tree - Left View of Binary Tree
  • Binary Tree - Right View of Binary Tree
  • Binary Tree - Top View of Binary Tree
  • Binary Tree - Bottom View of Binary Tree
  • Root Equals Sum of Children

Sorting

  • Bubble, Selection, Insertion Sorting
  • Merge Sort

Matrix

  • Find row with the maximum number of 1's
  • Set Matrix Zeroes
  • Zigzag (or diagonal) Traversal of Matrix
  • Binary Search - Count Negative Numbers in a Sorted Matrix
  • Binary Search - Find Target Indices After Sorting Array
  • Binary Search - Smallest Common Element in All Rows
  • Richest Customer Wealth
  • Rotate Image

Math

  • Divisor Game
  • Subtract the Product and Sum of Digits of an Integer
  • Add Two Integers
  • Recursion - DP - Memoization - Fibonacci Number
  • Climbing Stairs

Recursion

  • Reverse a String
  • Power of Three
  • Happy Number
  • Fibonacci Number

Greedy

  • Minimum Cost of ropes
  • To find the minimum number of coins
  • Minimum sum two numbers formed by digits of the array-2
  • Minimum sum absolute difference pairs two arrays
  • Find maximum equal sum of every three stacks
  • Activity selection problem greedy algorithm
  • N meetings in one room
  • Maximum Meetings in One Room

How to Use

Feel free to explore the programs and code snippets listed in this repository. They are categorized by topic, making it easy to find specific concepts you want to learn or revise. If you're also interested in improving your DSA skills, you're welcome to fork this repository and use it as a reference for your own learning journey.

Contributions

I have personally authored or sourced these programs from reputable resources to ensure accuracy and quality. However, if you find any issues, have suggestions for improvements, or want to contribute your own solutions, I welcome your contributions! Please submit pull requests or reach out to me.

Contact

If you have any questions, suggestions, or just want to connect, you can reach me through my GitHub profile.

Happy coding and happy learning!

dsa's People

Contributors

shaik-sohail-72 avatar

Stargazers

 avatar  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.