Datenstrukturen: Unterschied zwischen den Versionen
Aus Das Sopra Wiki
Keine Bearbeitungszusammenfassung |
|||
| Zeile 248: | Zeile 248: | ||
== Laufzeiten nach eigenen Tests in ms == | == Laufzeiten nach eigenen Tests in ms == | ||
Alle Eigenschaften und Bemerkungen aus der vorherigen Sektion gelten auch hier. | |||
Der Quellcode des für die Tests verwendeten Miniprogramms kann [[DatenstrukturenSpeedTest|hier]] eingesehen werden. | Der Quellcode des für die Tests verwendeten Miniprogramms kann [[DatenstrukturenSpeedTest|hier]] eingesehen werden. | ||
| Zeile 271: | Zeile 273: | ||
! Clear | ! Clear | ||
! Count | ! Count | ||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/bb359438.aspx HashSet<T>] | ! [http://msdn.microsoft.com/en-us/library/bb359438.aspx HashSet<T>] | ||
| Zeile 291: | Zeile 288: | ||
| O(n) | | O(n) | ||
| O(1) | | class="close" | O(1) | ||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx LinkedList<T>] | ! [http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx LinkedList<T>] | ||
| Zeile 311: | Zeile 303: | ||
| O(n) | | O(n) | ||
| O(1) | | class="close" | O(1) | ||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx List<T>] | ! [http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx List<T>] | ||
| Zeile 331: | Zeile 318: | ||
| O(n) | | O(n) | ||
| class="close" | O(1) | |||
| class="close" | | |||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/7977ey2c.aspx Queue<T>] | ! [http://msdn.microsoft.com/en-us/library/7977ey2c.aspx Queue<T>] | ||
| Zeile 351: | Zeile 333: | ||
| O(n)<br> | | O(n)<br> | ||
| O(1)<br> | | class="close" | O(1)<br> | ||
|- | |- | ||
| Zeile 374: | Zeile 348: | ||
| O(n)<br> | | O(n)<br> | ||
| class="close" | O(1)<br> | |||
| class="close" | | |||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/ms668265.aspx SynchronizedCollection<T>] | ! [http://msdn.microsoft.com/en-us/library/ms668265.aspx SynchronizedCollection<T>] | ||
| Zeile 394: | Zeile 363: | ||
| O(n)<br> | | O(n)<br> | ||
| class="close" | O(1)<br> | |||
| class="close" | | |||
|} | |} | ||
| Zeile 420: | Zeile 381: | ||
! Clear | ! Clear | ||
! Count | ! Count | ||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/xfhwa508.aspx Dictionary<TKey, TValue>] | ! [http://msdn.microsoft.com/en-us/library/xfhwa508.aspx Dictionary<TKey, TValue>] | ||
| Zeile 429: | Zeile 387: | ||
| O(1) | | O(1) | ||
| O(n) | | O(n) | ||
| class="close" | O(1) | |||
| class="close" | | |||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/f7fta44c.aspx SortedDictionary<TKey, TValue>] | ! [http://msdn.microsoft.com/en-us/library/f7fta44c.aspx SortedDictionary<TKey, TValue>] | ||
| Zeile 439: | Zeile 394: | ||
| O(log n) | | O(log n) | ||
| O(n) | | O(n) | ||
| class="close" | O(1) | |||
| class="close" | | |||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Hashtable] | ! [http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Hashtable] | ||
| Zeile 449: | Zeile 401: | ||
| O(1) | | O(1) | ||
| O(n) | | O(n) | ||
| class="close" | O(1) | |||
| class="close" | | |||
|- | |- | ||
! [http://msdn.microsoft.com/en-us/library/ms132319.aspx SortedList<TKey, TValue>] | ! [http://msdn.microsoft.com/en-us/library/ms132319.aspx SortedList<TKey, TValue>] | ||
| Zeile 459: | Zeile 408: | ||
| O(log n) | | O(log n) | ||
| O(n) | | O(n) | ||
| class="close" | O(1) | |||
| class="close" | | |||
|} [[Kategorie:Code-Beispiele]] | |} [[Kategorie:Code-Beispiele]] | ||
== Referenzen == | == Referenzen == | ||
