Randomized algorithms
Randomized Algorithm

Randomized algorithms

Randomised algorithms are built on statistical features played by random numbers.

Quicksort is a good example to illustrate this algorithm. For instance, in a class of taller students would naturally go at the back and smaller people in size at the front. That is the idea of quick sort. In this case we call it quick because a student can easily realise where his position shall be according to his height. Although it is quick it is not known as the fastest.

Now if we were to take numbers and emphasize on their nature and position, we will analyse if one number is in a sorted position. It means that all elements form the left for instance are numerically inferior and all the elements on the right are higher in value.

Quicksort follow divide and conquer strategy, meaning that the problem will be sorted into subproblems for quicker and a more feasible access to solutions.

In an event we have a list of number to quickly sort, we will find the pivot or the median and range all numbers from left to pivot in a ascending order and all numbers before the maximum or the infinity sign ordered in a descending number.

Dorian.H Mekni 

Follow more on Twitter -> https://twitter.com/dorianhmekni

要查看或添加评论,请登录

Dorian.H Mekni的更多文章

  • Central Processing Unit

    Central Processing Unit

    Don’t expect a computer to run code unless you instruct him to do so. Inevitably, as most machines, they do what they…

  • How to write a program ?

    How to write a program ?

    Well, some just go and write some code..

  • Communication Skills

    Communication Skills

    Communication is an exchange of information between individuals through common symbols or behaviour. Good…

  • Few topics in software engineering ?

    Few topics in software engineering ?

    What are the few topics in software engineering ? To better understand how to develop well-crafted software, it is…

  • How to design algorithm ?

    How to design algorithm ?

    In a broad sense, many algorithms approach problems in the same way. Thus, it is often convenient to classify them…

  • Divide-and-conquer algorithms

    Divide-and-conquer algorithms

    Divide-and-conquer algorithms are made up of three steps: divide, conquer, and combine. In the divide stage, we divide…

  • Grafik Marketing->

    Grafik Marketing->

    An album collecting beautiful pictures incorporating advert lines usable for marketing purposes. Access authorised to…

  • Grafik Marketing

    Grafik Marketing

    An album collecting beautiful pictures incorporating advert lines usable for marketing purposes. Access authorised to…

社区洞察

其他会员也浏览了