Tag Archives | conversion

[Algorithm – C / C ] Quick Sort – The issues

First we explore the idea of ​​the algorithm Ideas: Quicksort array divided into two lists by comparing each element of the list with a selected element is called key element. These elements less than or equal key element to be taken forward and in the first list, the larger particles are put on the rear latch […]

[Java] Permutation functions in Java – Swap in Java

The implementation of the function swap (swapped – conversion) in java it is somewhat different from C / C or Pascal,… To change the value of the variable out of a function, you must use the object. You can refer to 2 The following example function swap later if you want to read the details below or if the code was puzzled to read, then read […]

[Algorithm] Listing permutations

I will make the program lists the permutations of {1, 2, …, n} Order dictionaries. For example, with n = 3, I have listed enough 6 conversion: 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 So the first permutation is <1, 2, …, a>. Final permutation <n, A-1, …, 1〉. Permutation […]