Skip to main content
. 2023 Jan 10;23(2):819. doi: 10.3390/s23020819
Algorithm 1 Procedure to insert a new packet Uj.

   Find k such that Si<Us for 1≤i≤k−1, and Si>Us for i≥k

   for k<i≤M in parallel

       Pi←Pi−1; Pk←Uj                ▹ Shift [Pk,Pk+1,…,PM−1] to the right; Insert Uj in Pk