Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kubgus/python-algorithms

A collection of algorithms in Python.
https://github.com/kubgus/python-algorithms

algorithms foobar leetcode leetcode-python leetcode-solutions python python3

Last synced: about 11 hours ago
JSON representation

A collection of algorithms in Python.

Awesome Lists containing this project

README

        

Python Logo

# Pygorithms
A little repository I'm going to be working on for the next couple of weeks. (probably)
It's basically a collection of algorithms in Python.

## It's my code
The algorithms are done by me, so they aren't going to be super efficient.
Feel free to use them, though...

## Goals
Progress: 10
- [x] 1 algorithm
- [x] 10 algorithms
- [ ] 20 algorithms
- [ ] 30 algorithms

## Example
```py
def removeDuplicates(nums) -> int:
curr = -101
index = 0
for num in nums:
prev = curr
curr = num
if curr != prev:
nums[index] = curr
index += 1
return index
```