Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sydrawat01/algorithms

🗂 Leetcode and ADT
https://github.com/sydrawat01/algorithms

algorithms java leetcode leetcode-solutions

Last synced: 9 days ago
JSON representation

🗂 Leetcode and ADT

Awesome Lists containing this project

README

        

# Algorithms [![CircleCI](https://dl.circleci.com/status-badge/img/gh/sydrawat01/algorithms/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/sydrawat01/algorithms/tree/master)

Basic algorithms, Data Structures and Graphs. Also includes LeetCode problems and their solutions.

## Elementary Sorting Techniques

- [Bubble Sort](./src/main/java/ADT/Sort/BubbleSort)
- [Insertion Sort](./src/main/java/ADT/Sort/InsertionSort)
- [Selection Sort](./src/main/java/ADT/Sort/SelectionSort)
- [Merge Sort](./src/main/java/ADT/Sort/MergeSort) [WIP]
- [Shell Sort](./src/main/java/ADT/Sort/ShellSort)
- [Quick Sort](./src/main/java/ADT/Sort/QuickSort)
- [Heap Sort](./src/main/java/ADT/Sort/HeapSort) [WIP]

## Linear Non-Sorting Techniques

- [Knuth Shuffle](./src/main/java/ADT/Sort/Shuffling/KnuthShuffle.java)
- [Quick Select](./src/main/java/ADT/Sort/Shuffling/QuickSelect.java) [WIP]

## Abstract Data Types

- [Binary Search](./src/main/java/ADT/BinarySearch/BinarySearch.java) [Iterative & Recursive]
- [Binary Insertion Sort](./src/main/java/ADT/BinaryInsertion/BinaryInsertionSort.java)
- [ArrayList Duplicates](./src/main/java/ADT/Duplicates/ArrayListDuplicates.java)
- [LinkedList](./src/main/java/ADT/LinkedList)
- [Doubly Linked List](./src/main/java/ADT/DList/DList.java)
- [Stack](./src/main/java/ADT/Stack)
- [Queue](./src/main/java/ADT/Queue)
- [Quick Find](./src/main/java/ADT/UnionFind/QuickFindUF.java)
- [Quick Union](./src/main/java/ADT/UnionFind/QuickUnionUF.java)
- [Weighted Quick Union](./src/main/java/ADT/UnionFind/WeightedQuickUnionUF.java)
- [Weighted Quick Union with Path Compression](./src/main/java/ADT/UnionFind/WeightedQuickUnionPCUF.java)
- [Binary Search Tree](./src/main/java/ADT/BST/BinarySearchTree.java)

## APIs

- [Linked List](./src/main/java/ADT/API/LinkedList/LinkedList.java)
- [Doubly Linked List](./src/main/java/ADT/API/DoublyLinkedList)
- [Stack](./src/main/java/ADT/API/Stack)
- [Queue](./src/main/java/ADT/API/Queue)
- [Queue as Doubly-linked list](./src/main/java/ADT/API/DoublyLinkedList/DLLQueue.java)
- [Bag](./src/main/java/ADT/API/Bag)

## Graphs

- [Depth First Search](./src/main/java/Graphs/DFS.java)
- [DFS Paths](./src/main/java/Graphs/DFSPaths.java)
- [Breadth First Search](./src/main/java/Graphs/BFSPaths.java)
- [Undirected Graph](./src/main/java/Graphs/Graph.java) [Basic]
- [Directed Graphs](./src/main/java/Graphs/digraph)
- [Minimum Spanning Tree](./src/main/java/Graphs/MST)
- [Shortest Path](./src/main/java/Graphs/ShortestPath)

## Leetcode Solutions

Below are some LeetCode problems that are solved using Java. These are divided into easy, medium and hard problems for
better classification.

Long way to go!

### Easy Java

- [x] [9. Palindrome Number](https://leetcode.com/problems/palindrome-number/) : [Solution](./src/main/java/leetcode/solutions/solution9)
- [x] [35. Search Insert Position](https://leetcode.com/problems/search-insert-position/) : [Solution](./src/main/java/leetcode/solutions/solution35)
- [x] [58. Length of Last Word](https://leetcode.com/problems/length-of-last-word/) : [Solution](./src/main/java/leetcode/solutions/solution58)
- [x] [83. Remove Duplicates from a Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) : [Solution](./src/main/java/leetcode/solutions/solution83)
- [x] [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) : [Solution](./src/main/java/leetcode/solutions/solution206)
- [x] [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/): [Solution](./src/main/java/leetcode/solutions/solution234)
- [x] [287. Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) : [Solution](./src/main/java/leetcode/solutions/solution287)
- [x] [442. Find All Duplicates in an Array](https://leetcode.com/problems/find-all-duplicates-in-an-array/) : [Solution](./src/main/java/leetcode/solutions/solution442)
- [x] [1342. Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) : [Solution](./src/main/java/leetcode/solutions/solution1342)
- [x] [1356. Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/) : [Solution](./src/main/java/leetcode/solutions/solution1356)
- [x] [1365. How Many Numbers Are Smaller Than the Current Number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/) : [Solution](./src/main/java/leetcode/solutions/solution1365)
- [x] [2062. Count Vowel Substrings of a String](https://leetcode.com/problems/count-vowel-substrings-of-a-string/) : [Solution](./src/main/java/leetcode/solutions/solution2062)

## Unit Tests

Unit tests have been implemented for 100% code coverage. Algorithms that have not yet been implemented, or have bugs, have not been implemented yet.

Here's the link to the unit tests: [Unit Tests](/src/test/java)

## Author

[Siddharth Rawat](https://sydrawat.netlify.app)

## [License](./LICENSE)