Hallo,
ich habe einen Stringarray, das pro Index ein Wort hat.
Das Array wurde vorher mit Array.Sort sortiert, sodass mehrfach vorhandene Wörter hintereinander gespeichert sind.
Wie kann ich die Anzahl eines jeden Wortes im Array ermitteln?
Sollte man das in einem zwei-dimensionalen Array machen?
Bsp.:
wort(1) Apfel
wort(2) Apfel
wort(3) Apfel
wort(4) Banane
wort(5) Banane
wort(6) Clown
-->
Apfel 3x
Banane 2x
Clown 1x
Danke im Voraus
Ludwig
ich habe einen Stringarray, das pro Index ein Wort hat.
Das Array wurde vorher mit Array.Sort sortiert, sodass mehrfach vorhandene Wörter hintereinander gespeichert sind.
Wie kann ich die Anzahl eines jeden Wortes im Array ermitteln?
Sollte man das in einem zwei-dimensionalen Array machen?
Bsp.:
wort(1) Apfel
wort(2) Apfel
wort(3) Apfel
wort(4) Banane
wort(5) Banane
wort(6) Clown
-->
Apfel 3x
Banane 2x
Clown 1x
Danke im Voraus
Ludwig