Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoth2357/dsa-practice
💪 A collection of solutions to various Data Structures and Algorithms problems solved by me.
https://github.com/thoth2357/dsa-practice
algorithms data-structures dsa-algorithm learning-by-doing
Last synced: about 2 months ago
JSON representation
💪 A collection of solutions to various Data Structures and Algorithms problems solved by me.
- Host: GitHub
- URL: https://github.com/thoth2357/dsa-practice
- Owner: thoth2357
- Created: 2022-03-09T11:09:35.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T04:26:26.000Z (3 months ago)
- Last Synced: 2024-11-10T16:09:42.593Z (about 2 months ago)
- Topics: algorithms, data-structures, dsa-algorithm, learning-by-doing
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DSA Practice
This repository contains implementations of various Data Structures and Algorithms (DSA) problems that i have embarked on. Each file contains a unique solution to a specific problem, described below.
## Table of Contents
1. [BalancedBracket.py](#1-balancedbracketpy)
2. [BalancedSplit.py](#2-balancedsplitpy)
3. [BinaryGap.py](#3-binarygappy)
4. [IsomorphicStrings.py](#4-isomorphicstringspy)
5. [IsSubsequence.py](#5-issubsequencepy)
6. [MoveZerosToLeft.py](#6-movezerostoleftpy)
7. [NoOfVisibleNodes.py](#7-noofvisiblenodespy)
8. [PivotIndex.py](#8-pivotindexpy)
9. [QueueRemoval.py](#9-queueremovalpy)
10. [RunningSum1DArray.py](#10-runningsum1darraypy)## 1. `BalancedBracket.py`
This script checks if a sequence of brackets is balanced. It ensures that every opening bracket has a corresponding closing bracket and that they are properly nested. It handles various types of brackets: `()`, `{}`, and `[]`.## 2. `BalancedSplit.py`
The `BalancedSplit.py` file provides a solution to partition an array into two subsets with equal sums. It focuses on ensuring that the elements in one subset are strictly less than the elements in the other subset.## 3. `BinaryGap.py`
This file calculates the binary gap, which is the longest sequence of consecutive zeros that is surrounded by ones in the binary representation of a given integer.## 4. `IsomorphicStrings.py`
The `IsomorphicStrings.py` file checks whether two strings are isomorphic. Two strings are considered isomorphic if the characters in one string can be replaced to get the other string, maintaining the order of characters.## 5. `IsSubsequence.py`
This script determines if one string is a subsequence of another. It checks whether all characters of the smaller string appear in the larger string in the same order but not necessarily consecutively.## 6. `MoveZerosToLeft.py`
This file contains an algorithm that moves all zeros in an array to the left while preserving the order of the non-zero elements. It ensures the operation is performed in-place with minimal overhead.## 7. `NoOfVisibleNodes.py`
This script computes the number of visible nodes in a binary tree from the top view. It provides a solution using a breadth-first search (BFS) to determine the nodes visible at each horizontal level.## 8. `PivotIndex.py`
The `PivotIndex.py` file provides a solution to find the pivot index in an array. The pivot index is the index where the sum of the numbers to the left is equal to the sum of the numbers to the right.## 9. `QueueRemoval.py`
This file implements a queue removal strategy where elements are removed based on their values and indices. The goal is to process the queue in a way that maximizes the removed element's priority in each step.## 10. `RunningSum1DArray.py`
This script calculates the running sum of a 1D array. Each element in the resulting array is the sum of all previous elements plus the current element.