- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- Lalikiraly: Mercis kalandok - Huszonnyolcadik rész - Az újrakezdés
- Ismerkedés a Zyxel NSA325 v2-vel
- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: MárkaLánc
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- NvidiaRTX: Xiaomi Electric Scooter 6 Max: Az első rollerem
- Sapphi: StremHU | Source – Self-hostolható Stremio addon magyar trackerekhez
- Navaren: Resident Evil Requiem szösszenet
Ú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?:))
- Endgame Gear & Xtrfy gamer egerek /MZ1/OP1 8K/XM2we/XM1R/XM1 RGB (fehér/fekete/lila)/
- 27% - Passzív MiniPC! Intel Core i5-8350U / 16GB DDR4 / 512GB NVMe SSD!
- AZONNALI SZÁLLÍTÁSSAL Eladó Windows 8 / 8.1 Pro
- HIBÁTLAN iPhone 13 256GB Starlight-1 ÉV GARANCIA - Kártyafüggetlen, MS4676, 100% AKKSI
- HP ProDesk 600 G2 MT, i7-6700,8GB DDR4,256GB SSD,DVD-RW,WIN11
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

