- Otthoni hálózat és internet megosztás
- Vodafone otthoni szolgáltatások (TV, internet, telefon)
- Windows 10
- Microsoft Office és Office 365 topic
- SkyShowtime
- Linux kezdőknek
- Musk szerint már jövőre itt vannak a Tesla Optimus humanoid robotok
- Ubuntu Linux
- YouTube
- Kodi és kiegészítői magyar nyelvű online tartalmakhoz (Linux, Windows)
Új hozzászólás Aktív témák
-
pmonitor
aktív tag
válasz joysefke #9468 üzenetére
Én így fordítottam át:
using System;
namespace IsmPerm
{
class Program
{
static int findCeilInt(int[] str, int first, int l, int h)
{
int ceilIndex = l;
for (int i = l + 1; i <= h; i++)
if (str[i] > first && str[i] < str[ceilIndex])
ceilIndex = i;
return ceilIndex;
}
static void Teszt_1(int[] tomb)
{ //https://www.geeksforgeeks.org/print-all-permutations-of-a-string-with-duplicates-allowed-in-input-string/
int size = tomb.Length;
Array.Sort(tomb);
bool isFinished = false;
while (!isFinished)
{
int x = 1, i;
for (int k = 0; k < size; ++k) Console.Write("{0} ", tomb[k]);
Console.WriteLine("");
for (i = size - 2; i >= 0; --i) if (tomb[i] < tomb[i + 1]) break;
if (i == -1) isFinished = true;
else
{
int ceilIndex = findCeilInt(tomb, tomb[i], i + 1, size - 1);
int temp = tomb[i];
tomb[i] = tomb[ceilIndex];
tomb[ceilIndex] = temp;
Array.Sort(tomb, i + 1, size - i - 1);
}
}
}
static void Main(string[] args)
{
int[] tomb = new int[] { 500, 500, 600, 600, 700};
Teszt_1(tomb);
Console.ReadKey();
}
}
}http://www.bferi.hu/download.php ; http://bferi.hu/egyeb.php
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Politika
- A fociról könnyedén, egy baráti társaságban
- Luck Dragon: Asszociációs játék. :)
- Gaming notebook topik
- Mibe tegyem a megtakarításaimat?
- Milyen CPU léghűtést vegyek?
- Gitáros topic
- AMD Navi Radeon™ RX 6xxx sorozat
- Otthoni hálózat és internet megosztás
- Házimozi belépő szinten
- További aktív témák...
- Acer Nitro Óriás Magyar Gamer Laptop 17.3" i5 4210H 16GB 256GB SSD +1TB GTX 950M 4GB Dobozában!
- Asus Strix RX 560 OC 4gb GDDR5 DirectX 12
- 2 db Corsair Vengeance LPX DDR4 3000MHz 8GB CL16
- Samsung Galaxy Watch 6 Classic 47mm új állapot
- Lenovo Gamer Laptop i7 7700HQ 16GB DDR4 128GB SSD +1TB GTX 1050 Ti 4GB Jó Akku