About Algorithm: Difference between revisions

From My Limbic Wiki
Line 29: Line 29:
         return leftIndex;
         return leftIndex;
     }
     }
}
</pre>
</pre>
* [[Index.php?title=Fibonacci|Fibonacci]]
* [[Index.php?title=Fibonacci|Fibonacci]]

Revision as of 22:56, 5 October 2025

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