Datenstrukturen: Unterschied zwischen den Versionen

Aus Das Sopra Wiki
Dietsch (Diskussion | Beiträge)
Dietsch (Diskussion | Beiträge)
Zeile 31: Zeile 31:
| class="blank" | <br>
| class="blank" | <br>
   
   
! Add
! width="50px"| Add
   
   
! Remove
! Remove
Zeile 51: Zeile 51:
! [http://msdn.microsoft.com/en-us/library/bb359438.aspx HashSet&lt;T&gt;]
! [http://msdn.microsoft.com/en-us/library/bb359438.aspx HashSet&lt;T&gt;]
   
   
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity
| O(1) <br> O(n)<ref name="countlargercapacity" />
| O(1)
| O(1)
   
   
Zeile 91: Zeile 90:
! [http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx List&lt;T&gt;]
! [http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx List&lt;T&gt;]
   
   
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity
| O(1)<br>O(n)<ref name="countlargercapacity" />
   
   
| O(n)
| O(n)
Zeile 111: Zeile 110:
! [http://msdn.microsoft.com/en-us/library/7977ey2c.aspx Queue&lt;T&gt;]
! [http://msdn.microsoft.com/en-us/library/7977ey2c.aspx Queue&lt;T&gt;]
   
   
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity
| O(1)<br>O(n)<ref name="countlargercapacity" />
   
   
| O(1)<br>
| O(1)<br>
Zeile 134: Zeile 133:
! [http://msdn.microsoft.com/en-us/library/3278tedw.aspx Stack&lt;T&gt;]
! [http://msdn.microsoft.com/en-us/library/3278tedw.aspx Stack&lt;T&gt;]
   
   
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity <br>
| O(1)<br>O(n)<ref name="countlargercapacity" />
   
   
| O(1)<br>
| O(1)<br>
Zeile 154: Zeile 153:
! [http://msdn.microsoft.com/en-us/library/ms668265.aspx SynchronizedCollection&lt;T&gt;]
! [http://msdn.microsoft.com/en-us/library/ms668265.aspx SynchronizedCollection&lt;T&gt;]
   
   
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity<br>
| O(1)<br>O(n)<ref name="countlargercapacity" />
   
   
| O(n)<br>
| O(n)<br>
Zeile 194: Zeile 193:
|-
|-
| class="blank" |  
| class="blank" |  
! Add  
! width="50px" | Add  
! Remove  
! Remove  
! ContainsKey  
! ContainsKey  
Zeile 204: Zeile 203:
|-
|-
! [http://msdn.microsoft.com/en-us/library/xfhwa508.aspx Dictionary&lt;TKey, TValue&gt;]  
! [http://msdn.microsoft.com/en-us/library/xfhwa508.aspx Dictionary&lt;TKey, TValue&gt;]  
| O(1)<br>O(n) wenn Count + 1 &gt; Capacity
| O(1)<br>O(n)<ref name="countlargercapacity" />
| O(1)  
| O(1)  
| O(1)  
| O(1)  
Zeile 224: Zeile 223:
|-
|-
! [http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Hashtable]  
! [http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Hashtable]  
| O(1)<br>O(n) wenn Count + 1 > Capacity
| O(1)<br>O(n)<ref name="countlargercapacity" />
| O(1)
| O(1)
| O(1)
| O(1)