ALGORITHM PARTITION QS

2

They could guide me how this algorithm works

    
asked by Agon 22.05.2017 в 01:58
source

1 answer

3

The pseudocode is not made for one language or another, but tries to abstract from them to be understandable by all programmers even when not all program in the same language.

Explaining the pseudocode completely would not make much sense. While it is true that there are some that introduce more details than others.

I think it's a mental effort that you have to perform and, if you're not able, start with simpler algorithms.

I leave you a gif that will help you to create a mental image of the procedure of the algorithm and then be able to understand the pseudocode much better.

If afterwards you have more concrete doubts, like some of the loops, of course you can be helped.

algorithm simulation

Edit:

I have had to prepare algorithm subjects in engineering and it has always been very helpful to take a folio, a pencil and start running the algorithm manually. First with simple cases and little by little increasing the complexity. Even today I am to take paper and folio to make me the mental image in specific cases. Many people have the great ability to do this automatically mentally. With practice you can.
I hope it helps you.

    
answered by 22.05.2017 в 02:30