Zum Inhalt springen

PalimPalim123

Mitglieder
  • Gesamte Inhalte

    1
  • Benutzer seit

  • Letzter Besuch

  1. Hey, ich hab folgende Aufgabe im Studium und weiß nichts recht damit anzufangen: An element of an array A is a winner if it is stored in A more than length(A)/2 times. Clearly, an array does not necessarily have a winner. Suppose you can perform comparisons on the elements of the array. The comparison test can give 3 possible outcomes: <, >, = . Using SELECT find a Winner in O(n) comparisons. Make sure your algorithm correctly determines whether a winner exists. Ich steh da ziemlich auf dem schlauch. Kann mir vielleicht jemand weiterhelfen? Danke im Voraus. lg

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...