Zdravim osadenstvo fora. Maam taky maly problem, dostal som zadanie v ktorom mam porovnat dva triediace algorytmi. Su to Shakesort a Strandsort prvy dokazem bezproblemov napisat v Ccku ale nejako som nepochopil princip strandsortu a tak ma napadlo ci by to niekto z vas nevedel napisat alebo ci sa tym uz niekto nezapodieval predomnou.
http://en.wikipedia.org/wiki/Strand_sort
tu je nieco o tom algorytme aj nejake pseudokody ak by vam to pomohlo, ja by som to potreboval napisat v cistom Ccku.
_________________ MB: Gigabyte GA M57 SLI S4 | P: Athlon 64 X2 5200+(Winsdor) | RAM: ADATA Extreme edition Vitesta 2x1024MB 800MHz | G: Saphire AMD Radeon HD 2600XT 256Mb DDR4 | HDD: Seagate BArracuda 160GB 8MB Cache | Z: Fortron Blue Storm 400W
"92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature"
_________________ MB: Gigabyte GA M57 SLI S4 | P: Athlon 64 X2 5200+(Winsdor) | RAM: ADATA Extreme edition Vitesta 2x1024MB 800MHz | G: Saphire AMD Radeon HD 2600XT 256Mb DDR4 | HDD: Seagate BArracuda 160GB 8MB Cache | Z: Fortron Blue Storm 400W
"92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature"
Nevedel by to neikto aspom podla tohto pseudocodu?? ja si s tym fakt neviem dat rady. PROOOSIIIMMM.
Kód:
procedure strandSort( A : list of sortable items ) defined as: while length( A ) > 0 clear sublist sublist[ 0 ] := A[ 0 ] remove A[ 0 ] for each i in 0 to length( A ) do: if A[ i ] > sublist[ last ] then append A[ i ] to sublist remove A[ i ] end if end for merge sublist into results end while return results end procedure
_________________ MB: Gigabyte GA M57 SLI S4 | P: Athlon 64 X2 5200+(Winsdor) | RAM: ADATA Extreme edition Vitesta 2x1024MB 800MHz | G: Saphire AMD Radeon HD 2600XT 256Mb DDR4 | HDD: Seagate BArracuda 160GB 8MB Cache | Z: Fortron Blue Storm 400W
"92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature"
noo trochu si mi pomohol ale moc nie aj tak to nei je vyriesene ja som z toho uz jelen, taku drbnutu ulohu uz som davnio nemal.. ale dik za snahu, aj to sa ceni.
NO co ostatny? Uz nikto nema gule na to pustit sa do toho?
_________________ MB: Gigabyte GA M57 SLI S4 | P: Athlon 64 X2 5200+(Winsdor) | RAM: ADATA Extreme edition Vitesta 2x1024MB 800MHz | G: Saphire AMD Radeon HD 2600XT 256Mb DDR4 | HDD: Seagate BArracuda 160GB 8MB Cache | Z: Fortron Blue Storm 400W
"92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature"