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

What Is The Cost/ Complexity Of Insert In List At Some Location?

In Python, a list has list.insert(i, x) to 'Insert an item at a given position.'. In C++, … Read more What Is The Cost/ Complexity Of Insert In List At Some Location?

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 Python Code For Finding The Longest Word That Can Be Made Of Other Words In The List

I am preparing for some coding interviews and came up with a solution to the following problem: &#… Read more Time Complexity Of Python Code For Finding The Longest Word That Can Be Made Of Other Words In The List