https://github.com/sunthecoder/study
Study Repo
https://github.com/sunthecoder/study
Last synced: about 2 months ago
JSON representation
Study Repo
- Host: GitHub
- URL: https://github.com/sunthecoder/study
- Owner: SunTheCoder
- Created: 2025-02-04T15:08:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T17:43:28.000Z (about 1 year ago)
- Last Synced: 2025-08-01T22:58:29.967Z (8 months ago)
- Size: 359 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Study
- Resizing Arrays is expensive
## Linked List
[Linked List](LinkedList.md)
[Middle of the Linked List](MiddleOfTheLinkedList.md)
[Linked List Cycle](LinkedListCycle.md)
[Delete Middle Node of a Linked List](DeleteMiddleNodeOfaLinkedList.md)
[Remove Duplicates from Sorted List](RemoveDuplicatesFromSortedList.md)
## Sieve of Eratosthenes
Priority: High
[Sieve of Eratosthenes](SieveOfEratosthenes.md)
- Time Complexity: O(n log log n)
- Space Complexity: O(n)
- Used to find all prime numbers up to a given limit
```javascript
function sieveOfEratosthenes(n) {
const isPrime = new Array(n + 1).fill(true);
isPrime[0] = isPrime[1] = false;
for (let i = 2; i * i <= n; i++) {
if (isPrime[i]) {
for (let j = i * i; j <= n; j += i) {
isPrime[j] = false;
}
}
}
const primes = [];
for (let i = 2; i <= n; i++) {
if (isPrime[i]) {
primes.push(i);
}
}
return primes;
}
```
## Tuple Same Product
Priority: High
[Tuple Same Product](TupleSameProduct.md)
## Sliding Window
Priority: High
[Find Index of First Occurence in a String](FindIndexOfFirstOccurenceInAString.md)
### Distint Numbers in Each Subarray
Priority: High
[Distinct Numbers in Each Subarray](DistinctNumbersInEachSubArray.md)
- Time Complexity: O(n)
- Space Complexity: O(n)
- Used to find the number of distinct numbers in each subarray
## Two Pointers
[Two Pointers](TwoPointers.md)
## Prefix Sum
## Hash Table
Priority: High
[Sentence Similarity](SentenceSimilarity.md)
[Next Greater Element](NextGreaterElement.md)
## Stacks
Priority: High
[Stacks](Stacks.md)
[Simplify Path](SimplifyPath.md)
[IsValid](IsValid.md)
[Reverse Prefix of Word](ReversePrefixOfWord.md)
[Next Greater Element](NextGreaterElement.md)
[Moving Average from Data Stream](MovingAverageFromDataStream.md)
## Queue
[Queue](Queue.md)