السلام عليكم ورحمة الله وبركاته
الرجاء من الاخوان شرح هذا الكود ( ولا عليكم امر )
اقتباسInsert Circular ( ):Description: Here QUEUE is an array with N locations. FRONT and REAR points to the front and rearelements of the QUEUE. ITEM is the value to be inserted.1. If (FRONT == 1 and REAR == N) or (FRONT == REAR + 1) Then2. Print: Overflow3. Else4. If (REAR == 0) Then [Check if QUEUE is empty](a) Set FRONT = 1(b) Set REAR = 15. Else If (REAR == N) Then [if REAR reaches end if QUEUE]6. Set REAR = 17. Else8. Set REAR = REAR + 1 [increment REAR by 1][End of Step 4 If]9. Set QUEUE[REAR] = ITEM10. Print: ITEM inserted[End of Step 1 If]11. Exit
تقبلو تحياتي