r/shittyprogramming • • Jul 12 '19
This is technically N(0), amirite?
import requests
from lxml import html
def fibonacci(n):
sequence = ()
while n >= len(sequence):
sequence_html = html.fromstring(requests.get('https://oeis.org/A000045').content)
sequence = sequence_html.xpath('//tt/text()')[0].split(', ')
return int(sequence[n])
107
Upvotes
View all comments
Show parent comment
13
u/galexj9 Jul 12 '19
I think he means big O notation O(1) <=> O(0) ?