矩阵的QR分解
GramSchmidt
设存在 B { x 1 , x 2 , … , x n } \mathcal{B}\left\{\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{n}\right\} B{x1,x2,…,xn}在施密特正交化过程中 q 1 x 1 ∣ ∣ x 1 ∣ ∣ q_1\frac{x_1}{||x_1||} q1∣∣x1∣∣x1 q k …
算法题牛客网NC88 寻找第K大
题目: 思路就是做个排序,要求时间复杂度 O ( n log n ) O(n\log n) O(nlogn),因此选用快排。代码:
class Solution:def quickSort(self, a, start, end):if start > end:returnval a[start]…