Skip to content Skip to sidebar Skip to footer
Showing posts with the label Time Complexity

Search A List In Another List Using Python

I am trying to write the sublist search algorithm using Python. For reference : https://www.geeksf… Read more Search A List In Another List Using Python

Time Complexity Of A Recursive Function With Two Calls

Consider this code: def count_7(lst): if len(lst) == 1: if lst[0] == 7: ret… Read more Time Complexity Of A Recursive Function With Two Calls

Is There A List Of Big O Complexities For The Numpy Library?

I'm doing a time complexity analysis of an algorithm and need to know what kind of complexities… Read more Is There A List Of Big O Complexities For The Numpy Library?

Sliding Window Maximum In O(n) Time

Input: listi = [9, 7, 8, 4, 6, 1, 3, 2, 5] Output: # m=3 listo = [9, 8, 8, 6, 6, 3, 5] Given a ra… Read more Sliding Window Maximum In O(n) Time

Time Complexity Of Operation - Python

I was wonder what the time complexity of certain operation in python are: x = k * l ( multiplicatio… Read more Time Complexity Of Operation - Python

Is The Time-complexity Of Iterative String Append Actually O(n^2), Or O(n)?

I am working on a problem out of CTCI. The third problem of chapter 1 has you take a string such as… Read more Is The Time-complexity Of Iterative String Append Actually O(n^2), Or O(n)?

Sliding Window Maximum In O(n) Time

Input: listi = [9, 7, 8, 4, 6, 1, 3, 2, 5] Output: # m=3 listo = [9, 8, 8, 6, 6, 3, 5] Given a ra… Read more Sliding Window Maximum In O(n) Time