About Algorithm: Difference between revisions
From My Limbic Wiki
(→Tips) |
(→Tips) |
||
| Line 3: | Line 3: | ||
* Use Math.max(int,int) to get the max number between a number and a calculation. https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ | * Use Math.max(int,int) to get the max number between a number and a calculation. https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ | ||
* Two pass are necessary to calculate the left and right products https://leetcode.com/problems/product-of-array-except-self/ | * Two pass are necessary to calculate the left and right products https://leetcode.com/problems/product-of-array-except-self/ | ||
* A product invert the sign, the max becomes the min, and the min becomes the max: https://leetcode.com/problems/maximum-product-subarray/ | |||
=Sorting Algoritms= | =Sorting Algoritms= | ||
* [[Index.php?title=Binary Search|Binary Search]] | * [[Index.php?title=Binary Search|Binary Search]] | ||
Revision as of 04:24, 3 October 2025
Tips
- Use Set/Hashet for unique values https://leetcode.com/problems/contains-duplicate/
- Use Math.max(int,int) to get the max number between a number and a calculation. https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
- Two pass are necessary to calculate the left and right products https://leetcode.com/problems/product-of-array-except-self/
- A product invert the sign, the max becomes the min, and the min becomes the max: https://leetcode.com/problems/maximum-product-subarray/
Sorting Algoritms
- Binary Search
- Fibonacci
- MergeSort
- QuickSort (Java)
- Bit Manipulation
- Backtracking
- Graph Traversal
- Union-Find
- Dynamic Programming
- Greedy
- Sliding Window / Two Pointers
- BubbleSort (Java)
- Swapping the adjacent numbers two by two by order
Graphs
- Dijkstra
- Topologic sorting
Cryptography & Compression
- Shannon-Fano
- Huffman
- Diffie-Hellman
- RSA
Prime Numbers
- ?
Most beautiful Equation
- P=NP (Les Équations de Yang Mills)
- Millenium problems (Clay Mathematics Institute)
- Few ideas