wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Collectionklassen in C#

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

Welche der folgenden Collections kann keine doppelten Werte speichern?

a)

IComparer<T>

b)

LinkedList<T>

c)

SortedSet<T>

d)

List<T>

2.

Welche Collections unterstützen Zugriffe mit dem [ ]-Operator?

a)

List<T>

b)

SortedSet<T>

c)

Dictionary<TKey, TValue>

d)

HashSet<T>

e)

Queue<T>

3.

In welcher Collection werden Wertepaare abgespeichert?

a)

HashSet

b)

Dictionary

c)

LinkedList

d)

SortedSet

4.

Was ist der Returntype der Methode Add in einem HashSet<T>?

a)

void

b)

int

c)

Der Typeparameter der Collectionklasse

d)

bool

5.

Welche Collectionklasse funktioniert mit einem LIFO-Prinzip? (LIFO=Last-in-first-out)

a)

List<T>

b)

Queue<T>

c)

Dictionary<TKey, TValue>

d)

Stack<T>

6.

Welche Collectionklasse funktioniert mit einem FIFO-Prinzip? (FIFO=First-in-first-out)

a)

Stack<T>

b)

Queue<T>

c)

Dictionary<TKey, TValue>

d)

LinkedList<T>

7.

Wie groß ist die Komplexität eines Lesezugriffs auf den Schlüssel eines Dictionaries?

a)

linear O(n)

b)

konstant O(1)

c)

logarithmisch O(ln(n))

d)

faktoriell O(n!)