algorithm study--sorting(1)

王朝vc·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Doing a thing better is often a waste of time.

-------Robert Byrne

After studying C++ for part of the third semester in my college time..i am working on some basic algorithm these days. Except the hard and dull and serious basic algorithm analysis,the first but very important question that i encounter is sorting problem...

WELL,I THINK IT IS NOT SO NECESSARY TO INTRODUCE ,WHAT IS SORTING,

CUZ IT IS JUST A LITTLE BIT SILLY WHEN YOU WRITE IN ENGLISH...

Everybody knows that there are many methods ,from simple (even children about 3 years can understand it) to very complex(Knuth cannt solve it ,like the effiency of quick sort algorithm...), for sorting...

To be easilest,we assume the objects that you are dealing are just integers ,so forget the concepts about crucial key or something like that..i will shout GOD DAMN,when you say"well ,i really dont know wether 1 is bigger or smaller than 5..."..So i will say something about this silly kind of sorting,maybe i just can say such stuff..forgive me..men..

The most elemetary sorting algorithm is what always called SELECTION SORT..and it is used the brute force strategy that is you deal with problem dierctly ,not to make it abstract. Maybe you know it already,say,find the minium and find the less minium ,and the ,say,the less less minium, and continue this process ,at last to put the element to a new array...we will get the sorted array now... In fact,i tell you,you got it, you really got it,it is just like that... but not so damned directly,cuz computers , not like suppermarket , dont allow you to get and put as you wish...

To make it more clear,

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航