Skip to content

Instantly share code, notes, and snippets.

View ItsMeWithTheFace's full-sized avatar
🍛
nomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnom

Rakin Uddin ItsMeWithTheFace

🍛
nomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnomnom
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@ItsMeWithTheFace
ItsMeWithTheFace / karatsuba.py
Created May 1, 2017 00:39
Attempt implementation of the Karatsuba Multiplication algorithm which uses the Divide and Conquer paradigm. Returns the product of two integers.
'''
Attempt implementation of the Karatsuba Multiplication algorithm which uses the
Divide and Conquer paradigm. Returns the product of two integers.
Runtime:
Analysis of this algorithm can be done using the Master Method/Theorem (see
https://en.wikipedia.org/wiki/Master_theorem for details).
Recall the Master Method takes the form of:
@ItsMeWithTheFace
ItsMeWithTheFace / InversionCount.py
Last active May 15, 2017 03:10
Program to demonstrate an algorithm that uses the Divide and Conquer paradigm. This program calculates the number of inversions in an unsorted list of distinct integers given a file input. Overall, this algorithm runs in O(nlogn) time with n as the size of the input list.
''' Program to demonstrate an algorithm that uses the Divide and Conquer
paradigm. This program calculates the number of inversions in an unsorted list
of distinct integers given a file input.
Runtime:
Overall, this algorithm runs in O(nlogn) time with n as the size of the input
list.
'''