Ali Hamdi Ali Fadel · @Ali Hamdi Ali Fadel

Github

floyd_warshall

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Floyd-Warshall (all pairs shortest path) algorithm implementation.

0 · 3 · 1 Show code

coprime?

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Return true if two number are relatively prime (co-prime), false otherwise.

1 · 0 · 0 Show code

crawl_and_extract_urls

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Crawl a web page and extract URLs from its HTML using naive loop implementation. Its running time is comparable or less than using URI.extract().

2 · 0 · 1 Show code

n_choose_k

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Calculates N choose K, N! / (K! * (N - K)!), in a mathematical operations efficient way.

1 · 0 · 1 Show code

nth_catalan

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Calculates the n-th Catalan number, (2N)! / (N! * (N + 1)!), in a mathematical operations efficient way.

0 · 0 · 2 Show code

nth_fibonacci

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Calculates the n-th Fibonacci number iteratively.

0 · 0 · 0 Show code

palindrome?

Ali Hamdi Ali Fadel · @AliOsm · almost 3 years

Takes a string and return true if it is a palindrome, false otherwise.

0 · 3 · 0 Show code