- Párduc a gépben: teszten az ASUS ExpertBook Ultra
- Raspberry Pi
- SSD kibeszélő
- Döbbenetesen sok energia kell az érkező Nova Lake működéséhez?
- Milyen videókártyát?
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Fejhallgató erősítő és DAC topik
- HiFi műszaki szemmel - sztereó hangrendszerek
- Melyik tápegységet vegyem?
- Gaming notebook topik
-
PROHARDVER!

Új hozzászólás Aktív témák
-
Chesterfield
őstag
Erre a feladatra tudtok hatékonyabb algoritmust?
Write a function that, when passed a list and a target sum, returns two distinct zero-based indices of any two of the numbers, whose sum is equal to the target sum. If there are no two numbers, the function should return null.
For example, FindTwoSum(new List<int>() { 3, 1, 5, 7, 5, 9 }, 10) should return a Tuple<int, int> containing any of the following pairs of indices:
0 and 3 (or 3 and 0) as 3 + 7 = 10
1 and 5 (or 5 and 1) as 1 + 9 = 10
2 and 4 (or 4 and 2) as 5 + 5 = 10public static Tuple<int, int> FindTwoSum(IList<int> list, int sum)
{
for (int i = 0; i < list.Count; i++)
{
for (int j = i + 1; j < list.Count; j++)
{
if (list[i] + list[j] == sum)
{
return Tuple.Create(i, j);
}
}
}
return null;
}azt mondja a kiértékelő, hogy Performance testen ez elbukik.
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Samsung Galaxy Tab S10 Ultra 5G 12/256 2028.09.03-ig garancia
- iPad Pro M1 11 512GB wifi + Magic Keyboard + Apple Pencil
- 3TB Seagate Barracuda 3,5-es HDD-k
- Ryzen 7 5800X / AIO / NITRO+ RX 9060 XT 16GB / B550M WIFI / 32GB RAM / 1TB NVMe SSD / 650W GOLD
- Lenovo Thinkpad L13 G4 i5-1335u 16 GB 256 GB NVMe 13.3" érintős laptop
- Dell OptiPlex/ Hp EliteDesk /Lenovo ThinkCentre mini, micro PC/ 8.-9.-10.gen/ Számla/garancia
- Xiaomi Redmi Note 13 Pro 256GB,Újszerű,Dobozaval,12 hónap garanciával
- Samsung Galaxy A70 / 6/128GB / Kártyafüggetlen / 12Hó Garancia
- Csak kipróbált Mini-Erőmű! Mini-PC Ryzen 7 7840HS 16GB 512GB 1 év garancia
- SMAILIO HD 5" GPS autós navigáció
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


