تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - مرتب سازی شل یا پوسته ای (Shell Sort) در C++
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر takcoder.ir


آموزش برنامه نویسی با استفاده از نوین ترین روش و ارائه پروژه های نمونه و مجموعه عظیم سورس کدهای آماده برای شما دوستان

مدیر سایت : Yahya Taherzadeh
نویسندگان
نظرسنجی
زبان برنامه نویسی مورد علاقه شما؟






تابع مرتب سازی شل یا پوسته ای (Shell Sort) که بدترین عملکرد آن ( O(nlog2n  است:
void shellsort(int A[],int max)
{
     int stop,swap,limit,temp;
   int x=(int)(max/2)-1;
   while(x>0)
   {
        stop=0;
      limit=max-x;
      while(stop==0)
      {
           swap=0;
         for(int k=0;k<limit;k++)
         {
              if(A[k]>A[k+x])
            {
                 temp=A[k];
               A[k]=A[k+x];
               A[k+x]=temp;
               swap=k;
            }
         }
         limit=swap-x;
         if(swap==0)
              stop=1;
      }
      x=(int)(x/2);
   }
}




نوع مطلب : آموزش، پروژه های رایگان، سی| سی پلاس پلاس، طراحی الگوریتم، ساختمان داده، 
برچسب ها : Sort، Shell، shell sort، array، function، تابع، آرایه،
لینک های مرتبط :
Yahya Taherzadeh
سه شنبه 19 آذر 1392
شنبه 4 شهریور 1396 01:48 ب.ظ
Hey there fantastic blog! Does running a blog such as this take
a great deal of work? I have very little expertise in coding but I had been hoping to start my own blog soon. Anyway,
if you have any ideas or techniques for new blog owners please share.
I understand this is off subject however I simply wanted to ask.
Appreciate it!
دوشنبه 16 مرداد 1396 03:11 ب.ظ
Greetings! Very helpful advice in this particular
post! It is the little changes which will make the greatest changes.

Many thanks for sharing!
شنبه 14 مرداد 1396 08:30 ب.ظ
This is a very good tip especially to those fresh to the blogosphere.
Simple but very precise info… Appreciate your sharing this one.
A must read article!
شنبه 14 مرداد 1396 04:41 ب.ظ
Hi, I log on to your blog like every week. Your writing style is awesome, keep it up!
جمعه 6 مرداد 1396 08:40 ب.ظ
You have made some decent points there. I checked on the
web to find out more about the issue and found most individuals will go along with your views on this web site.
سه شنبه 13 تیر 1396 03:58 ق.ظ
Precisely what I was looking for, thank you for posting.
دوشنبه 12 تیر 1396 08:28 ق.ظ
Hello, Neat post. There is an issue with your web site in internet
explorer, could check this? IE nonetheless is the
market leader and a big part of folks will pass
over your magnificent writing due to this problem.
چهارشنبه 31 خرداد 1396 10:41 ب.ظ
You could definitely see your enthusiasm in the paintings you
write. The world hopes for more passionate writers like
you who are not afraid to mention how they believe. Always follow your
heart.
دوشنبه 1 خرداد 1396 12:16 ب.ظ
Hi there, I enjoy reading all of your article post. I like to write a little comment to support you.
چهارشنبه 30 فروردین 1396 07:01 ب.ظ
It is appropriate time to make some plans for the future and it is time to
be happy. I have read this post and if I could I want to suggest you some interesting things or tips.
Perhaps you could write next articles referring to this article.
I want to read more things about it!
یکشنبه 27 فروردین 1396 10:30 ب.ظ
Hi there, all is going sound here and ofcourse every one is sharing information, that's
in fact fine, keep up writing.
جمعه 25 فروردین 1396 08:19 ب.ظ
Heya! I know this is somewhat off-topic but I
had to ask. Does managing a well-established blog like yours take a lot of work?
I am brand new to operating a blog but I do write in my journal daily.
I'd like to start a blog so I can easily share my personal experience and feelings online.

Please let me know if you have any kind of recommendations or tips
for new aspiring blog owners. Thankyou!
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر




صفحات جانبی
آمار وبلاگ
تاییدیه پرداخت
تبلیغات
به سایت تک کدر خوش آمدید