SlideShare a Scribd company logo
Prog_2 course- 2014 
2 bytes team 
Kinan keshkeh 
IT Engineering-Damascus University 
3rd year
Single linked 
list 
Locomotive and trailer
Why linked list ? 
When we deal with arrays sometimes we are exposed to the problem is ((constant Reservation in memory )) 
That means the size of the array already constant and we can’t change it in program 
We can use pointer to set up data structure 
Similar array but it allows us to change their size in the program during execution 
This data structure is named ((linked list))
Linked list are divided into : 
Single linked list 
Double linked list 
Circular linked list 
In the second year
Single linked list : 
list is elements of record type one of it fields pointer on another record 
Consists of a list of elements that are arranged where each element is assigned with the following element- with pointer, as in the following example: 
Definition : 
p 
type 
type 
type 
type 
nil 
H 
d 
u 
a 
<type>; 
char 
integer 
11 
10 
22 
7 
Type ptr=^node; 
node = record ; 
Key : 
next : ptr; 
end ; 
Var p : ptr;
Create list : 
We can create a single linked list of two ways : 
From the last node to the first one(FILO) 
1 
4 multiples 
Ex : 
Write procedure to create single linked list include Multiples number (3) Limited within the domain of 1 to 14, where the list is building from the last node to the first one 
4 nodes 
numbers are { 3,6,9,12 } 
Type ptr=^node 
Node=record 
Key : integer ; 
Next : ptr ; 
End ;
Procedure create1(var p1:ptr); 
Var temp: ptr; x,i : integer; 
Begin 
for i:=1 to 4 do 
begin 
end ; 
End ; 
p1:=nil; 
x:=3; 
new ( temp ); 
temp^.key :=x; 
temp^.next := p1 ; 
p1 := temp; 
x := x+3; 
x 
i 
p1 
Nil 
next 
Nil 
temp 
12 
3 
1 
9 
p1 
3 
p1 
6 
12 
6 
3 
2 
9 
temp 
p1 
4 
temp 
temp 
p1
Create list : 
From the first node to the last one (FIFO) : 
2 
Ex : 
Write procedure to create single linked list include Multiples number (5) Limited within the domain of 1 to 20, where the list is building from the first node to the last one 
Procedure create2( var p2 :ptr ); 
Var temp:ptr; x,i : integer; 
Begin 
x :=5; 
new(p2); 
p2.key:=x; 
temp:=p2; 
For i:=2 to 4 do 
Begin 
new (temp^.next); 
temp:= temp^.next; 
x:=x+5; 
temp^.key:=x; 
end; 
temp^.next :=nil; 
End ;
Procedure create2( var p2 :ptr ); 
Var temp:ptr; x,i : integer; 
Begin 
For i:=2 to 4 do 
Begin 
temp:= temp^.next; 
x:=x+5; 
end; 
End ; 
temp^.key:=x; 
temp^.next :=nil; 
new(p2); 
x :=5; 
P2^.key:=x; 
temp:=p2; 
new (temp^.next); 
next 
20 
i 
15 
10 
x 
5 
5 
2 
p2 
nil 
3 
temp 
We create the first node befor we start the repetitive loop 
temp 
10 
20 
temp 
temp 
15 
4 
Each list must end with nil
Procedure Add element to the list : 
To add element to the list we must keep attention to three cases : 
1.The list is empty 
2.Add in the beginning of the list 
3.Add in the middle or at the end of the list 
Guide: to add a node to the list you must have two pointers , one refers to the previous node and the other refers to the following node ,from Place Addition 
9 
8 
3 
P 
5 
{general}
Ex : 
We have a list each node in it takes the following form : 
Name 
Age 
next 
Key =record 
Assuming that the list arranged by (Name) 
Write procedure to add node to the list where does not change the list arrangement 
Type 
Std=record age: integer; name: string; end; 
Ptr = ^node; 
node=record key: std; next: ptr; end; 
Let’s do it ….
Procedure addelem(var p : ptr ; vstd : std ) ; 
Var 
pre,s,temp : ptr ; 
located : Boolean ; 
Begin 
new(temp); 
temp^.key :vstd; 
temp^.next :nil; 
If p=nil then 
p:=temp 
else 
begin 
s :=p; 
pre:=nil; 
located :=false; 
While (s<>nil) and (not located) do 
Begin 
If (s^.key.name < vstd.name) then 
begin 
pre:=s; 
s:=s^.next; 
end 
else 
located:=true; 
end; 
temp^.next:=s; 
if s=p then 
p:=temp; 
else 
pre^.next:=temp; 
end ; 
End; {procedure} 
{Create node } 
{Add in the middle or at the end of the list } 
{List is empty} 
{Find the right place} 
{Add in the beginning of the list} 
{ initialize }
next 
Hussam 
p 
nil 
22 
Salma 
18 
Jad 
25 
name 
Age 
{new(temp); 
temp^.key :vstd; 
temp^.next :nil; 
Ahmed 
20 
Ahmed 
20 
here 
next 
Hussam 
p 
nil 
22 
Salma 
18 
Jad 
25 
Ahmed 
20 
{Add in the beginning of the list }
next 
Hussam 
22 
Salma 
18 
Jad 
25 
p 
Kinan 
20 
here 
next 
Hussam 
22 
Salma 
18 
Jad 
25 
p 
Kinan 
20 
{Add in the middle of the list }
Procedure delete node from the list : 
To delete node from the list we must take into account three cases : 
1.Element to be deleted does not exist 
2.Deletion in the beginning of the list 
3.Deletion in the middle or at the end of the list 
P 
Pre
Procedure deletenode(var p:Ptr; var flag:char; key:integer) 
Var temp,s :ptr; located:=Boolean; 
Begin 
If p=nil then 
flag:=‘3’ 
Else 
Begin 
if p^.key=key then 
begin 
flag:=‘1’; 
temp:=p; 
p:=p^.next; 
dispose(temp); 
end 
else 
begin 
s:=p; 
located:=false; 
While (s^.next<>nil) and (not located) do 
Begin 
if (s^.next^.key<>key) then 
s:=s^.next 
else 
located:=true; 
end; 
If located then 
begin 
flag:=‘1’; 
temp:=s^.next; 
s^.next:=s^.next^.next; 
dispose(temp); 
end 
Else flag:=‘2’; 
end; end; 
End; 
{List is empty} 
{Deletion in the beginning of the list} 
{Find the element you want to delete} 
{Do the deletion} 
{element not found} 
{initialize}
p 
S 
next 
20 
15 
10 
5 
temp 
nil 
next 
20 
10 
5 
p 
nil 
{Deletion in the middle of the list }
Homework: 
ان سًأنح 1 : نذ اٌُ سهسهح )لائحح يشتثطح ي طشف واحذ ( 
ع اُصشها يشتثح تٌض كم ع صُش سجم حٌتىي عهى ) id , 
name ) 
أكتة تش اَيجا قٌىو ت قُم انع اُصش راخ انق حًٍ id انفشد حٌ إنى 
يهف ث اُئ يع يشاعاج حزف انع صُش ان قًُىل يثاششج تعذ قَهه 
إنى ان هًف ثى طثاعح ان هًف وانسهسهح 
ان سًأنح 2 : أكتة الإجشائ اٍخ وانتىاتع انتان حٍ : 
 إجشائ حٍ نهثحث ع أول ع صُش أكثش ي n ي قائ حً ي الأعذاد ان ىًجثح يشتثح تصاعذ اٌ تح ثٍ عٌ ذٍ )- 1 ( ف حال نى 
تٌى انعثىس عهى عذد أكثش ي n 
 إجشائ حٍ نهثحث ع أخش ع صُش أصغش ي m ي قائ حً ي الأعذاد ان ىًجثح ان شًتثح تصاعذ اٌ 
 إجشائ حٍ لإضافح ع صُش ) k ( ف ان كًا ان اًُسة ف انسهسهح 
 إجشائ حٍ تقىو تتثذ مٌ ع صُش ون كٍ m,n ي انسهسهح 
ان ذًخهح 
أستخذو الإجشائ اٍخ انساتقح ف تش اَيج سئ سٍ قٌىو تإ شَاء 
سهسهح ي الأعذاد انصح حٍح ان شًتثح تصاعذ اٌ عهى انشكم 
انتان 2,4,6….192} { تتشت ةٍ ) FIFO ) 
ان سًانح 3 : أكتة تش اَيج لإ شَاء سهسهت الأونى )1P ( عذد 
ع اُصشها ) n ( ذٌخهها ان سًتخذو تتشت ةٍ ) FIFO ( وانثا حٍَ) P2 ) 
عذد ع اُصشها ) m ( ذٌخهها ان سًتخذو تتشت ةٍ ) FILO ( ثى قى 
تحزف انع اُصش انت تقثم انقس حً عهى 3 ف انسهسهح 
الأونى ثى قى تذيج انسهسهت تسهسهح واحذج تثذأ ب p2 
وت تُه ب p1 
Good luck….. 
Kinan 
Group : group link 
Mobile phone- Kinan : 0994385748 
Facebook account : kinan’s account 
2 bytes team

More Related Content

PDF
2Bytesprog2 course_2014_c7_double_lists
PPTX
Programming for engineers in python
DOCX
Lisp programming
PPTX
Lecture 6: linked list
PDF
Constructs and techniques and their implementation in different languages
PPTX
CSE240 Doubly Linked Lists
PPTX
Doubly Linked List || Operations || Algorithms
PPT
Ch17
2Bytesprog2 course_2014_c7_double_lists
Programming for engineers in python
Lisp programming
Lecture 6: linked list
Constructs and techniques and their implementation in different languages
CSE240 Doubly Linked Lists
Doubly Linked List || Operations || Algorithms
Ch17

What's hot (15)

PPTX
Link list
PPT
Linked list
PPTX
11 15 (doubly linked list)
PPTX
Variables 2
PDF
Linked list Output tracing
PPTX
Linked list
PPTX
LINKED LISTS
PPTX
Linked list
PPTX
Cs419 lec5 lexical analysis using dfa
PDF
Linked List Static and Dynamic Memory Allocation
PDF
Theta notation
PDF
LR Parsing
PDF
Data structure doubly linked list programs
PPT
Section 1-5
Link list
Linked list
11 15 (doubly linked list)
Variables 2
Linked list Output tracing
Linked list
LINKED LISTS
Linked list
Cs419 lec5 lexical analysis using dfa
Linked List Static and Dynamic Memory Allocation
Theta notation
LR Parsing
Data structure doubly linked list programs
Section 1-5
Ad

Viewers also liked (17)

PPTX
Ppt of operations on one way link list
PPTX
E learning y b-learning
PPTX
Single linked list
PPT
Unit i
PPSX
Data Structure (Circular Linked List)
PPT
Unit vi(dsc++)
PPT
Unit iii(dsc++)
PPTX
Doubly linked list (animated)
PPT
Unit ii(dsc++)
PPT
header, circular and two way linked lists
PPT
PPT
Circular linked list
PPTX
Doubly linked list
PPT
linked list
PPS
Single linked list
PPT
Linked lists
PPTX
Linked list
Ppt of operations on one way link list
E learning y b-learning
Single linked list
Unit i
Data Structure (Circular Linked List)
Unit vi(dsc++)
Unit iii(dsc++)
Doubly linked list (animated)
Unit ii(dsc++)
header, circular and two way linked lists
Circular linked list
Doubly linked list
linked list
Single linked list
Linked lists
Linked list
Ad

Similar to 2Bytesprog2 course_2014_c6_single linked list (20)

PPT
Operations Running Times 1DSA EE 2204.ppt
PDF
Double linked list c8
PPTX
Data structure
PPTX
U2.linked list
PPT
Insert - General Case data structure EE 22024.ppt
PPTX
Array implementation and linked list as datat structure
PPT
List data structure
PPT
List Data Structure
PPT
Operations on linked list
PDF
Linked lists c7
PPTX
Arrays and linked lists
PPTX
linkedlist.pptx
PPTX
Lecture ............ 3 - Linked Lists.pptx
PPTX
Engineering.CSE.DataStructure.Linkedlist.notes
PPT
unit 5 stack & queue.ppt
PPT
linked list1.ppt linked list ppts and notes
PPT
Data structure lecture 5
PPTX
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
PPTX
data structures lists operation of lists
PPT
Operations Running Times 1DSA EE 2204.ppt
Double linked list c8
Data structure
U2.linked list
Insert - General Case data structure EE 22024.ppt
Array implementation and linked list as datat structure
List data structure
List Data Structure
Operations on linked list
Linked lists c7
Arrays and linked lists
linkedlist.pptx
Lecture ............ 3 - Linked Lists.pptx
Engineering.CSE.DataStructure.Linkedlist.notes
unit 5 stack & queue.ppt
linked list1.ppt linked list ppts and notes
Data structure lecture 5
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
data structures lists operation of lists

More from kinan keshkeh (20)

PDF
10 Little Tricks to Get Your Class’s Attention (and Hold It)
PDF
Simpson and lagranje dalambair math methods
PDF
Shapes and calculate (area and contour) / C++ oop concept
PDF
Shapes and calculate (area and contour) / C++ oop concept
PDF
GeneticAlgorithms_AND_CuttingWoodAlgorithm
PDF
Algorithm in discovering and correcting words errors in a dictionary or any w...
PDF
2Bytesprog2 course_2014_c9_graph
PDF
2Bytesprog2 course_2014_c8_units
PDF
2Bytesprog2 course_2014_c5_pointers
PDF
2Bytesprog2 course_2014_c4_binaryfiles
PDF
2Bytesprog2 course_2014_c3_txtfiles
PDF
2Bytesprog2 course_2014_c2_records
PDF
2Bytesprog2 course_2014_c1_sets
PDF
2Bytesprog2 course_2014_c1_sets
PDF
2Bytesprog2 course_2014_c1_sets
PDF
2Bytesprog2 course_2014_c1_sets
PDF
2 BytesC++ course_2014_c13_ templates
PDF
2 BytesC++ course_2014_c12_ polymorphism
PDF
2 BytesC++ course_2014_c11_ inheritance
PDF
2 BytesC++ course_2014_c10_ separate compilation and namespaces
10 Little Tricks to Get Your Class’s Attention (and Hold It)
Simpson and lagranje dalambair math methods
Shapes and calculate (area and contour) / C++ oop concept
Shapes and calculate (area and contour) / C++ oop concept
GeneticAlgorithms_AND_CuttingWoodAlgorithm
Algorithm in discovering and correcting words errors in a dictionary or any w...
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c8_units
2Bytesprog2 course_2014_c5_pointers
2Bytesprog2 course_2014_c4_binaryfiles
2Bytesprog2 course_2014_c3_txtfiles
2Bytesprog2 course_2014_c2_records
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
2 BytesC++ course_2014_c13_ templates
2 BytesC++ course_2014_c12_ polymorphism
2 BytesC++ course_2014_c11_ inheritance
2 BytesC++ course_2014_c10_ separate compilation and namespaces

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
assetexplorer- product-overview - presentation
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Transform Your Business with a Software ERP System
PPTX
Introduction to Artificial Intelligence
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
ai tools demonstartion for schools and inter college
assetexplorer- product-overview - presentation
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Designing Intelligence for the Shop Floor.pdf
top salesforce developer skills in 2025.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Softaken Excel to vCard Converter Software.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Odoo Companies in India – Driving Business Transformation.pdf
Digital Systems & Binary Numbers (comprehensive )
Transform Your Business with a Software ERP System
Introduction to Artificial Intelligence
How to Migrate SBCGlobal Email to Yahoo Easily
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

2Bytesprog2 course_2014_c6_single linked list

  • 1. Prog_2 course- 2014 2 bytes team Kinan keshkeh IT Engineering-Damascus University 3rd year
  • 2. Single linked list Locomotive and trailer
  • 3. Why linked list ? When we deal with arrays sometimes we are exposed to the problem is ((constant Reservation in memory )) That means the size of the array already constant and we can’t change it in program We can use pointer to set up data structure Similar array but it allows us to change their size in the program during execution This data structure is named ((linked list))
  • 4. Linked list are divided into : Single linked list Double linked list Circular linked list In the second year
  • 5. Single linked list : list is elements of record type one of it fields pointer on another record Consists of a list of elements that are arranged where each element is assigned with the following element- with pointer, as in the following example: Definition : p type type type type nil H d u a <type>; char integer 11 10 22 7 Type ptr=^node; node = record ; Key : next : ptr; end ; Var p : ptr;
  • 6. Create list : We can create a single linked list of two ways : From the last node to the first one(FILO) 1 4 multiples Ex : Write procedure to create single linked list include Multiples number (3) Limited within the domain of 1 to 14, where the list is building from the last node to the first one 4 nodes numbers are { 3,6,9,12 } Type ptr=^node Node=record Key : integer ; Next : ptr ; End ;
  • 7. Procedure create1(var p1:ptr); Var temp: ptr; x,i : integer; Begin for i:=1 to 4 do begin end ; End ; p1:=nil; x:=3; new ( temp ); temp^.key :=x; temp^.next := p1 ; p1 := temp; x := x+3; x i p1 Nil next Nil temp 12 3 1 9 p1 3 p1 6 12 6 3 2 9 temp p1 4 temp temp p1
  • 8. Create list : From the first node to the last one (FIFO) : 2 Ex : Write procedure to create single linked list include Multiples number (5) Limited within the domain of 1 to 20, where the list is building from the first node to the last one Procedure create2( var p2 :ptr ); Var temp:ptr; x,i : integer; Begin x :=5; new(p2); p2.key:=x; temp:=p2; For i:=2 to 4 do Begin new (temp^.next); temp:= temp^.next; x:=x+5; temp^.key:=x; end; temp^.next :=nil; End ;
  • 9. Procedure create2( var p2 :ptr ); Var temp:ptr; x,i : integer; Begin For i:=2 to 4 do Begin temp:= temp^.next; x:=x+5; end; End ; temp^.key:=x; temp^.next :=nil; new(p2); x :=5; P2^.key:=x; temp:=p2; new (temp^.next); next 20 i 15 10 x 5 5 2 p2 nil 3 temp We create the first node befor we start the repetitive loop temp 10 20 temp temp 15 4 Each list must end with nil
  • 10. Procedure Add element to the list : To add element to the list we must keep attention to three cases : 1.The list is empty 2.Add in the beginning of the list 3.Add in the middle or at the end of the list Guide: to add a node to the list you must have two pointers , one refers to the previous node and the other refers to the following node ,from Place Addition 9 8 3 P 5 {general}
  • 11. Ex : We have a list each node in it takes the following form : Name Age next Key =record Assuming that the list arranged by (Name) Write procedure to add node to the list where does not change the list arrangement Type Std=record age: integer; name: string; end; Ptr = ^node; node=record key: std; next: ptr; end; Let’s do it ….
  • 12. Procedure addelem(var p : ptr ; vstd : std ) ; Var pre,s,temp : ptr ; located : Boolean ; Begin new(temp); temp^.key :vstd; temp^.next :nil; If p=nil then p:=temp else begin s :=p; pre:=nil; located :=false; While (s<>nil) and (not located) do Begin If (s^.key.name < vstd.name) then begin pre:=s; s:=s^.next; end else located:=true; end; temp^.next:=s; if s=p then p:=temp; else pre^.next:=temp; end ; End; {procedure} {Create node } {Add in the middle or at the end of the list } {List is empty} {Find the right place} {Add in the beginning of the list} { initialize }
  • 13. next Hussam p nil 22 Salma 18 Jad 25 name Age {new(temp); temp^.key :vstd; temp^.next :nil; Ahmed 20 Ahmed 20 here next Hussam p nil 22 Salma 18 Jad 25 Ahmed 20 {Add in the beginning of the list }
  • 14. next Hussam 22 Salma 18 Jad 25 p Kinan 20 here next Hussam 22 Salma 18 Jad 25 p Kinan 20 {Add in the middle of the list }
  • 15. Procedure delete node from the list : To delete node from the list we must take into account three cases : 1.Element to be deleted does not exist 2.Deletion in the beginning of the list 3.Deletion in the middle or at the end of the list P Pre
  • 16. Procedure deletenode(var p:Ptr; var flag:char; key:integer) Var temp,s :ptr; located:=Boolean; Begin If p=nil then flag:=‘3’ Else Begin if p^.key=key then begin flag:=‘1’; temp:=p; p:=p^.next; dispose(temp); end else begin s:=p; located:=false; While (s^.next<>nil) and (not located) do Begin if (s^.next^.key<>key) then s:=s^.next else located:=true; end; If located then begin flag:=‘1’; temp:=s^.next; s^.next:=s^.next^.next; dispose(temp); end Else flag:=‘2’; end; end; End; {List is empty} {Deletion in the beginning of the list} {Find the element you want to delete} {Do the deletion} {element not found} {initialize}
  • 17. p S next 20 15 10 5 temp nil next 20 10 5 p nil {Deletion in the middle of the list }
  • 18. Homework: ان سًأنح 1 : نذ اٌُ سهسهح )لائحح يشتثطح ي طشف واحذ ( ع اُصشها يشتثح تٌض كم ع صُش سجم حٌتىي عهى ) id , name ) أكتة تش اَيجا قٌىو ت قُم انع اُصش راخ انق حًٍ id انفشد حٌ إنى يهف ث اُئ يع يشاعاج حزف انع صُش ان قًُىل يثاششج تعذ قَهه إنى ان هًف ثى طثاعح ان هًف وانسهسهح ان سًأنح 2 : أكتة الإجشائ اٍخ وانتىاتع انتان حٍ :  إجشائ حٍ نهثحث ع أول ع صُش أكثش ي n ي قائ حً ي الأعذاد ان ىًجثح يشتثح تصاعذ اٌ تح ثٍ عٌ ذٍ )- 1 ( ف حال نى تٌى انعثىس عهى عذد أكثش ي n  إجشائ حٍ نهثحث ع أخش ع صُش أصغش ي m ي قائ حً ي الأعذاد ان ىًجثح ان شًتثح تصاعذ اٌ  إجشائ حٍ لإضافح ع صُش ) k ( ف ان كًا ان اًُسة ف انسهسهح  إجشائ حٍ تقىو تتثذ مٌ ع صُش ون كٍ m,n ي انسهسهح ان ذًخهح أستخذو الإجشائ اٍخ انساتقح ف تش اَيج سئ سٍ قٌىو تإ شَاء سهسهح ي الأعذاد انصح حٍح ان شًتثح تصاعذ اٌ عهى انشكم انتان 2,4,6….192} { تتشت ةٍ ) FIFO ) ان سًانح 3 : أكتة تش اَيج لإ شَاء سهسهت الأونى )1P ( عذد ع اُصشها ) n ( ذٌخهها ان سًتخذو تتشت ةٍ ) FIFO ( وانثا حٍَ) P2 ) عذد ع اُصشها ) m ( ذٌخهها ان سًتخذو تتشت ةٍ ) FILO ( ثى قى تحزف انع اُصش انت تقثم انقس حً عهى 3 ف انسهسهح الأونى ثى قى تذيج انسهسهت تسهسهح واحذج تثذأ ب p2 وت تُه ب p1 Good luck….. Kinan 
  • 19. Group : group link Mobile phone- Kinan : 0994385748 Facebook account : kinan’s account 2 bytes team