This is a most excellent place for technology news and articles.
Isn't it because list is linked list, so to get the Len it has to iterate over the whole list whereas to get emptyness it just have to check if there is a 1st element ?
I' too lazy to read the article BTW.
No, len is a constant time operation, at least in most cases I believe.
len
Isn't it because list is linked list, so to get the Len it has to iterate over the whole list whereas to get emptyness it just have to check if there is a 1st element ?
I' too lazy to read the article BTW.
No,
len
is a constant time operation, at least in most cases I believe.