返回卡包市场

Algorithmic complexity

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 17内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (17 张)

#1
正面 (问题)

Define time complexity

背面 (解答)

time it takes for a program to run

#2
正面 (问题)

Define space complexity

背面 (解答)

memory that is required

#3
正面 (问题)

Define Big O Notation

背面 (解答)

allows us to compare one algorithm to another as to choose the best option

#4
正面 (问题)

How to calculate Big O

背面 (解答)

-take the highest power e.g. 3n^3 + 4n^2 O(n^3)

#5
正面 (问题)

What is the Big O for constant time complexity

背面 (解答)

O(1)

#6
正面 (问题)

What is Big O for linear search

背面 (解答)

O(n)

#7
正面 (问题)

What is Big O for binary search

背面 (解答)

O(logn)

#8
正面 (问题)

What is Big O for Binary tree search

背面 (解答)

O(logn)

#9
正面 (问题)

What is Big O for Bubble sort

背面 (解答)

O(n^2)

#10
正面 (问题)

What is Big O for Merge sort

背面 (解答)

O(nlogn)

#11
正面 (问题)

What is the order of complexities?

背面 (解答)

• Constant • Logarithmic • Linear • Polynomial • Exponential • Factorial ‘Complexities love licking p*nises, especially Flynn’s’

#12
正面 (问题)

Define intractable

背面 (解答)

it is too complex to be solved in polynomial time, heuristic methods can be used to find a ‘good enough’ solution (DIFFERENT TO UNSOLVABLE)

#13
正面 (问题)

Define heuristic method

背面 (解答)

practical methods to find a sufficient, but not optimal solution

#14
正面 (问题)

Define halting problem

背面 (解答)

• used by Alan Turing as proof that some problems are unsolvable for a computer • tell if program will halt without running it

#15
正面 (问题)

What is Big O for Travelling salesman

背面 (解答)

O(n!)

#16
正面 (问题)

What is Big O for dynamic programming Travelling Salesman

背面 (解答)

O(a^n)

#17
正面 (问题)

What is big O for Hash table

背面 (解答)

O(1)