- ldave: New Game Blitz - 2026
- Real Racing 3 - Freemium csoda
- Luck Dragon: Asszociációs játék. :)
- Sapphi: StremHU | Source – Self-hostolható Stremio addon magyar trackerekhez
- sziku69: Szólánc.
- sziku69: Fűzzük össze a szavakat :)
- Cifu: Űrhajózás 2025 - Összefoglaló írás
- gban: Ingyen kellene, de tegnapra
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- lkristóf: Prohardver fórum userscript – hogy lásd, mikor neked válaszoltak
Új hozzászólás Aktív témák
-
#74220800
törölt tag
Amúgy a feladatom az lenne, hogy saját kezűleg kell implementalni egy priorityqueque-t, minheap struktúrával,
az alábbi interface segitsegevel:/**
* Manages elements within a priority queue. All Elements in this queue must
* implement the Comparable interface. If a element is requested from this data
* structure the smallest one is returned. If there are multiple smallest
* elements, one of them must be returned.
*/
public class PriorityQueue<T extends Comparable<T>> {
/**
* @param maxElements The maximum number of elements this queue can hold.
*/
public PriorityQueue(int maxElements);
/**
* Add e to the queue.
*
* @param e The element which sould be inserted (at the correct position) into the queue.
* @throws IllegalStateException if the queue is already full
*/
public void add(T e) throws IllegalStateException;
/**
* Returns and removes the smallest element in the queue.
*
* @return the smallest element
* @throws IllegalStateException if the queue is empty
*/
public T pop() throws IllegalStateException;
/**
* Return the current number of elements in the queue.
*
* @return the number of elements
*/
public int size();
}Es nem tudom, hogy milyen classot használhatnék e szerint az adatok belső menedzselésére.
A baj az, hogy a beepitett java PriorityQueue is minheapet használ.LinkedList<E> ill. ArrayList<E> szeretnek használni hozza.
Vagy a fenti feladat azt jelenti, hogy a bepitett PriorityQueue-hoz felülirom a pop() es add() metódusokat?
De akkor meg nem tudok indexeket hasznalni, és az algoritmus alapján szerintem mindenképpen olyan kell, ami indexelhető. Nem tudom ...
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Gyűjtői makulátlan , dobozos , bontatlan , fóliás , ROG GTX 1080 !!!
- Dell Latitude 5430 Új, Fóliás állapotú,i5 FHD IPS LCD,16GB, HU vil billentyűzet
- Gamer PC: Ryzen 5 5600 I B550 WiFi6 I 16GB DDR4 I RX 590 8GB I 1TB NVMe I 1000W I HAF XB EVO
- Samsung 850 EVO 1TB Sata3 SSD / Beszámítás OK!
- Intel I7-7700K / Beszámítás OK!
- Samsung Galaxy A33 5G / 6/128GB / Kártyafüggetlen / 12Hó Garancia /
- Dell Latitude 7390 13,3" FHD IPS, i5-i7, 8-16GB RAM, SSD, jó akku, számla, 6 hó gar
- AZONNAL KÉSZLETRŐL! Intel Core i5 14600K 32GB 6000MHz RAM 1TB Gen4 SSD RTX 5060 8GB FSP 750W
- LG 86QNED86A / MiniLED / 86" - 217 cm / 4K UHD / 144Hz / HDR Dolby Vision / FreeSync Premium / VRR
- ASRock Radeon RX 5600 XT PG D3 6GB OC GDDR6
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


