PROBLEM SOLVING TECHNIQUES
Dept. of CSE
PVPSIT, Kanuru.
PRASAD V. POTLURI SIDDHARTHA INSTITUTE OF TECHNOLOGY
B. Vinay Kumar
Wednesday, January 25, 2023
SORTING BY INSERTION
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
Pseudo-code:
begin
first:=a[1]; p:=1;
for i:= 2 to n do
if a[i] < first then
begin
first := a[i];
p := i
end;
a[p] := a[1];
a[1] := first;
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
for i:=3 to n do
begin
x := a[i]
j := i
while x < a[j-1] do
begin
a[j]:=a[j-1]
j := j - 1
end
a[j] := x
end
end
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques
B. Vinay Kumar
Wednesday, January 25, 2023
PVPSIT (Autonomous)
Problem Solving Techniques