Data Structure (2) 썸네일형 리스트형 [Dictionary] Big-O Efficiency of Python Dictionary 1. Big-O Efficiency of Python Dictionary Operators One important side note on dictionary performance is that the efficiencies are for average performance. Operation Big-O Efficiency copy O(n) get item O(1) set item O(1) delete item O(1) contains (in) O(1) iteration O(n) 2. Comparison of time efficiency of in operator between list and dictionary We will compare the performance of the contains ope.. [List] Big-O Efficiency of Python List 1. Big-O Efficiency of Python List Operators Operation Big-O Efficiency index [] O(1) index assignment O(1) append O(1) pop() O(1) pop(i) O(n) insert(i, item) O(n) del operator O(n) iteration O(n) contains (in) O(n) get slice [x:y] O(k) del slice O(n) set slice O(n+k) reverse O(n) concatenate O(k) sort O(nlogn) multiply O(nk) 2. Comparison of time efficiency of list.pop() method What we would ex.. 이전 1 다음