menu_book Course Curriculum (Data Structures & Algorithms) expand_more
Complexity & Foundations
Arrays & Strings
Linked Lists
Stacks & Queues
Hashing
Trees & Heaps
Graphs
Quadratic time
Learn Quadratic time in Data Structures & Algorithms with a focused explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Beginner
data-structures-algorithms-007.py
python
def all_pairs(values):
return [(a,b) for a in values for b in values] # O(n²)
print(all_pairs([1,2,3]))
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content