python C++高斯小學公式與xor sum速解Leetcode 268 Missing Number
片中講兩種解法,一是用Gauss的n(n+1)/2公式,二是用xor-sum
---
python C++ Gauss primary school formula and xor sum quick solution Leetcode 268 Missing Number
The film explains two solutions, one is to use Gauss’s n(n+1)/2 formula, and the other is to use xor-sum
The third solution is not shown in the film. Use radix sort and then binary search.
[codes on Leecode]https://leetcode.com/problems/missing-number/solutions/4754275/1-line-use-gauss-n-n-1-2-vs-xor-sum-vs-radixsort-binary-search-3ms-beats-99-92/
[Leetcode playList]https://www.youtube.com/watch?v=WjrWkPysfRM&list=PLYRlUBnWnd5IdDHk2BjqXwesydU17z_xk
[Dynamic Programming Playlist]https://www.youtube.com/watch?v=30yq3fmE6E8&list=PLYRlUBnWnd5K_XYUesV9oc6M9ONXII61T
沒有留言:
張貼留言