[Basic operations] Bit operations: binary state compression, pairwise transformation, lowbit operation

1. Binary state compression Binary state compression refers to compressing a file with a length of m m The bool array of m uses a m m A method of representing and storing m-bit binary integers. The following bit operations can be used to access the corresponding subscript elements in the original bool array. Operation […]

Linked list problem-discussion on the invalidity of swap(p,q) in the pairwise exchange linked list [adjacent nodes]

Article directory Exchange the nodes in the linked list two by two Problem Description Enter description output description input example output example answer full code Discussion on invalidity of swap(p,q) to feel Talking about IT class What are the pros and cons other ways Pairwise exchange of nodes in the linked list Description of the […]

Linked List-24. Pairwise Exchange of Nodes in Linked List 234. Palindrome Linked List 143. Rearranged Linked List 141. Ring Linked List 142. Ring Linked List II 160. Linked List Intersection C++ Implementation

Article directory 24. Exchange the nodes in the linked list two by two 234.Palindrome Linked List Linked list to array + statistical length Reverse the second half of the linked list Fast and slow pointer 143. Rearrange Linked List array double pointer timeout double queue reverse and insert linked list 141. Circular Linked List 142. […]

Use Python for normality test, variance homogeneity test, one-way ANOVA, pairwise comparison

Introduction One-way ANOVA is a parametric test, Used to statistically infer whether the overall means of different groups (number of groups ≥ 2) are the same. Conditions of use The use of this statistical inference method requires the following conditions to be met: ① Continuous data: The data to be analyzed must be continuous data, […]

Matrix pairwise multiplication and matrix product

Directory Parametric product (indicated by . in the formula): a*b, multiply(a,b) Multiply by a*b Multiply multiply(a,b) Implemented with numpy Implemented with torch Matrix product (represented by X in the formula): dot(a,b) , matmul(a,b) , a@b, bmm(a,b) dot(a,b) matmul(a,b) numpy implementation torch implementation a@b torch implementation numpy implementation bmm(a,b) Vector inner product: dot(a,b), a@b when both […]