About Algorithm

From My Limbic Wiki

Tips

Sorting Algoritms

    private int searchPivot(int[] nums){
        int size = nums.length;
        int rightIndex = size - 1, leftIndex = 0;
        int lastIndex = size - 1, lastValue = nums[lastIndex]; 
        int midIndex = 0, midValue = 0;

        while (leftIndex <= rightIndex) {
            midIndex = (leftIndex + rightIndex) / 2;
            midValue = nums[midIndex];
            
            if (midValue > lastValue) {
                leftIndex = midIndex + 1;
            } else {
                rightIndex = midIndex - 1;
            }
        }
        return leftIndex;
    }

Graphs

  • Dijkstra
  • Topologic sorting

Cryptography & Compression

  • Shannon-Fano
  • Huffman
  • Diffie-Hellman
  • RSA

Prime Numbers

  • ?

Most beautiful Equation