Problem Solving Techniques Computer Science Exercise

Official Computer Science Worksheets: Problem Solving Techniques

Access comprehensive chapter-wise worksheets for Problem Solving Techniques using the Problem Solving Techniques Computer Science Exercise. Designed to align with the 2026-27 academic syllabus for Computer Science, these printable practice sets help students reinforce key concepts and improve their overall exam readiness.

Solved Practice Worksheets for Computer Science

Navigate directly to the solved Computer Science worksheets using the digital viewer below. Each practice set includes detailed step-by-step solutions, allowing students to instantly cross-check their work and identify areas requiring further revision.

One Mark Question and Answer

Question. Define Sorting.
Answer. Sorting is a method of arranging data items in any order.

Question. What is searching?
Answer. It is a process of locating an element stored in a file.

Question. Mention the different structured programming constructs.
Answer. 
a. Sequence
b. Selection
c. Iteration

Question. What is stepwise Refinement?
Answer. Is a process of breaking down the problem at each stage to obtain a solutions.

Question. Name the different searching methods.
Answer. 
a. Linear Search
b. Binary Search

Question. Define module.
Answer. It is an independent set of statements, which can be called in another program.

Question. What is the main advantage of linear search method?
Answer. It is simple and useful when the elements to be searched are not in any definite order.

Question. What is the other name of bubble sort?
Answer. The bubble sort method is also called as sorting by exchange.

Question. What is structured programming?
Answer. It is a method of using the concept of sequence , selection , iteration and modularity.

Question. Name the searching technique which requires sorted elements.
Answer. Binary Search.

Question. What is top-down analysis?
Answer. Solving a problem by breaking it up into smaller parts is called as top-down analysis.

Question. What is top-down approach called as?
Answer. Top-down analysis is also called as stepwise refinement

Question. What is a module?
Answer. Each program segment is called a module.


Two Marks Question and Answer

Question. Give an example for top-down analysis.
Answer. 

Problem-Solving-Techniques-Computer-Science-Exercise-1

Question. Write any two characteristics of structured programming.
Answer.
a) Modifications are limited to module
b) Increases programmers productivity.

Question. Explain briefly the analysis of insertion sort method.
Answer.
a. The first pass of the algorithm results in one comparison and in the worst case may result in one exchange also.
b. The second pass results in two comparisons and in the worst case may result in two exchanges. Continuing the analysis we observe that as the iterations or passes increases the comparisons and exchanges increases. Finally the total number of comparisons will be equal to

1 + 2 + 3 + …….. + ( N -3 ) + ( N- 2) + ( N -1 )
= ( N ) * ( N – 1) /2
= O ( N2 )

Question. Explain any two properties of top-down approach
Answer. 
a. Code reusability
b. Program maintenance

Question. What are the two objectives of sorting process?
Answer. 
a. The movement of data should be as minimum.
b. Te data should be retained in the main memory.

Question. Analyze the bubble sort method of sorting data
Answer. 
a. The first pass results in N-1 comparisons.
b. The second pass results in N-2 and worst case results in N-2 exchanges. Continuing the analysis we observe that as the iterations increases the comparisons decreases.
= ( N-1 ) + ( N - 2 ) + ( N – 3) + . . . . . +2+1
= N * (N -1) / 2
= O( N2)

Question. Analyze the selection sort method of sorting data
Answer. 
a. The first pass results in N-1 comparisons.
b. The second pass with N-2 comparisons. We observe that as the iterations or passes increases the comparisons decreases.
= ( N-1 ) + ( N - 2 ) + ( N – 3) + . . . . . +2+1
= N * (N -1) / 2
= O( N2)

Question. What are the advantages of structured programming?
Answer.
a. Structured programs are easy to write as the programming logic is well organized.
b. Structured programs are easy to test and debug.


Five Marks Questions and Answers

Question. Mention the objectives of structured programming.
Answer. 
a. To produce error free program.
b. To incorporate basic structured constructs.
c. To eliminate use of GOTO Statements.
d. To obtain a disciplined approach towards programming.
e. To improve the flexibility of a program.

Question. Explain top-down analysis with an example.
Answer.
 

Problem-Solving-Techniques-Computer-Science-Exercise-2
Answer. The approach of dividing a problem into sub problems and dividing the sub problems until a solution is obtained is called top-down analysis.
Ex:

Question. Write an algorithm to sort an elements using Insertion Sort.
Answer. Algorithm for Insertion sort

Step 1 : START
Step 2 : Input N
Step 3 : for I← 0 to N -1
Read A [ I ]
( end of I for loop )
Step 4 : For I ← 1 to N -1 Do
Step 5 : J = I
Step 6 : While ( J > = 1 ) and ( A[ J ] < A [ J -1 ] )
Step 7 : TEMP = A [ J ]
Step 8 : A [ J ] = A [ J - 1 ]
Step 9 : A[ J - 1 ] = TEMP
Step 10 : J = J - 1
[ end of While loop ]
[ end of step I For loop ]
Step 11 : for I ← 0 to N -1
Step 12: Print A [ I ]
Step 13 : Stop
Consider the elements

Problem-Solving-Techniques-Computer-Science-Exercise-3

Pass 1:
A[1],A[0]>16,20,4,3
Pass 2:
A[2],A[1]> 16,4,20,3
A[1],A[0]>4,16,20,3
Pass 3:
A[3],A[2]> 4,16,3,20
A[2],A[1]>4,3,16,20
A[1],A[0]> 3,4 16,20
Sorted order is 3,4,16,20

Question. Explain bubble sort algorithm with example.
Answer. Algorithm for bubble sort
Step 1 : START
Step 2 : Input N
Step 3 : for I← 0 to N -1
Step 4 : Read ( A [ I ] )
( end of for loop )
Step 5 : for I← 1 to N -1
Step 6 : for J ← 0 to N –I - 1
Step 7 : If (A[ J ] > A [ J +1] )
Temp ← A [ J ]
A [ J ] ← A [ J + 1 ]
A [ J +1 ] ← Temp
[ end of if ]
[ end of J loop ]
[ end of I loop ]
Step 8 : for J ← 0 to N -1
Print A [ J ]
Step 9 : Stop
Consider the following elements: 50 , 20, 10 , 05

Problem-Solving-Techniques-Computer-Science-Exercise-4

Sorted order is 5, 10, 20 , 50

Question. Explain selection sort with an example.
Answer. Slection sort is based on finding the smallest element in the list and placing it at the first position. Then the next element is found and placed at the second position and so on.
Consider the elements 20,16,4,3

Pass 1:

Problem-Solving-Techniques-Computer-Science-Exercise-5

Problem-Solving-Techniques-Computer-Science-Exercise-6

Sorted order is 3 , 4 , 16 , 20

Algorithm for selection sort:
Step 1 : START
Step 2 : Input N
Step 3 : for I← 0 to N -1
Step 4 : Read A [ I ]
Step 5 : for I ← 0 to N -2
Step 6 : S ← A [ I]
Step 7 : Pos ← I
Step 8 : for J ← I + 1 to N -1
Step 9 : If ( A[ J] < S )
Step 10 : S ← A [ J ]
Step 11 : Pos ← J
[ end of if ]
[ end of J for loop ]
Step 12 : A [ Pos ] ← a[ I ]
Step 14 : A[ I ] ← S
[end of I for loop ]
Step 15: for I = 0 to N – 1
Step 16: Print A[ I ]
Step 17: Stop

Question. Explain Binary search algorithm
Answer. This algorithm is used to search for an element in a sorted list. The value of the element in the middle of the list is compared with the value of the element to be searched for . If the middle element is larger, the desired element has to be in the upper of the list. If the middle element is smaller, the desired element has to be lower half of the list. The number of elements to be searched is reduced by half in every iteration.
Algorithm for Binary Search:
Step 1: Low = 0
Step 2 : High = N – 1
Step 3 : Loc = -1
Step 4 : While ( Low < = High ) Do
Step 5 : M = ( Low + High ) / 2
Step 6 : If (ele = A[M ] ) Then
Step 7: Loc = M goto Step 12
[ end if ]
Step 8 : If (ele < A [M ] ) Then
Step 9: High ← M – 1
Step 10 : Else
Step 11 : Low ← M + 1
[ end of if ]
[ end of While loop ]
Step 12 : if ( Loc > = 0 ) Then
Step 13: Print “ ele , found , search successful ” , Loc
Step 14: else
Step 15 : Print “ Item not found , search Unsuccessful ”
[ end if ]
Step 16 : Stop

Question. Write the steps involved in performing binary search operation to search an element 56 in the following numbers.

Problem-Solving-Techniques-Computer-Science-Exercise-7

Answer. 
a. Problem-Solving-Techniques-Computer-Science-Exercise-8

Assuming ‘ a’ is the name of the array
initial values:
n = 7
low = 0
high = n – 1

= 6
mid = [ low + high ] / 2 = ( 0 + 6 ) / 2 = 3
S = 56 [ search element ]
a [ mid ] = 67
Step 1 : Compare the element in a [ mid ] and search element 56
67 is not equal to 56
Step 2 : Check whether search element comes after or before the mid index element
Since 56 < 67 [ The search element is lesser than 67 , then the search element lies to the left of mid point ]
Step 3 : Change high = mid – 1 = 3 – 1 = 2
mid = ( low + high ) / 2 = ( 0 + 2 ) / 2 = 1
Step 4 : Compare a [ mid ] and S for equality
Step 5 : Since 56 is greater than 48 [ If ( S > a [ mid ] ) i.e. 56 > 48 ]
Step 6: Change low = mid + 1 = 1 + 1 = 2
mid = ( low + high ) / 2 = ( 2 + 2 ) / 2 = 2
Step 7: Compare a [ mid ] and S for equality. Since S and a [ mid ] are equal search is successful and the element is found at the location mid i.e. 2

Question. Write an algorithm to find the maximum in an array
Answer. 
Step 1 : [Assume 1st element is the largest ]
large = A [ 0 ]
Step 2 : POS = 0
Step 3 : [ Find the largest element in the array and its position]
For I = 1 to N – 1 Do
Step 4 : If ( A [ I ] > large ) Then
Step 5 : large = A [ I ]
Step 6 : POS = 1
[ End if ]
[ End of step 3 for loop ]
Step 7: [ Print the largest and its position]
Print “ Largest = “ , large , “ position = “ , pos
Step 8: Exit

Question. Write an algorithm to find the minimum in an array
Answer. 
Step 1 : [Assume 1st element is the smallest]
small = A [ 0 ]
Step 2 : POS = 0
Step 3 : [ Find the smallest element in the array and its position]
For I = 1 to N – 1 Do
Step 4 : If ( A [ I ] < small ) Then
Step 5 : small = A [ I ]
Step 6 : POS = 1
[ End if ]
[ End of step 3 for loop ]
Step 7: [ Print the smallest and its position]
Print “ smallest = “ , small , “ position = “ , pos
Step 8: Exit

Question. Explain linear search method with an algorithm.
Answer. 
Step 1 : START
Step 2 : input N
Step 3 : for I← 0 to N -1
Read A [ I ]
Step 4 : Loc = -1
Step 5 : For I = 0 to N- 1 do
Step 6 : If ( ele = A[I]) Then
Step 7: Loc = I
Step 8 : Goto step 9
[ end if ]
[ end for ]
Step 9 : If ( Loc > = 0 ) then
Step 10: Print “ ele Found in location “ , Loc
Step 11: else
Step 12: Print “ ele not found ”
Step 13 Stop

Problem Solving Techniques Printable Worksheets and Exercises for Computer Science

Practice Exercises for Computer Science Problem Solving Techniques

Explore reliable practice questions for Problem Solving Techniques tailored for Computer Science learners. Use these structured worksheets to evaluate exam preparedness and strengthen problem-solving skills throughout the 2026 academic session.

Step-by-Step Solutions and Practice Guidelines

Each worksheet draws directly from authorized standard textbooks to maintain academic accuracy. Evaluating your finished exercises against expert-verified solutions helps master the formal presentation standards expected in school evaluations.

Enhance Speed with Online Practice

Wrap up your chapter revision by testing your knowledge against standard objective question formats. Explore our full library of free, up-to-date printable assignments to maximize your academic results in upcoming Computer Science evaluations.

FAQs

Where can I download the 2026-27 Computer Science printable worksheets for Computer Science Problem Solving Techniques?

You can download the latest chapter-wise printable worksheets for Computer Science Problem Solving Techniques for free from StudiesToday.com. These have been made as per the latest Computer Science curriculum for this academic year.

Are these Problem Solving Techniques Computer Science worksheets based on the new competency-based education (CBE) model?

Yes, Computer Science worksheets for Problem Solving Techniques focus on activity-based learning and also competency-style questions. This helps students to apply theoretical knowledge to practical scenarios.

Do the Computer Science Problem Solving Techniques worksheets have answers?

Yes, we have provided solved worksheets for Computer Science Problem Solving Techniques to help students verify their answers instantly.

Can I print these Problem Solving Techniques Computer Science test sheets?

Yes, our Computer Science test sheets are mobile-friendly PDFs and can be printed by teachers for classroom.

What is the benefit of solving chapter-wise worksheets for Computer Science Problem Solving Techniques?

For Problem Solving Techniques, regular practice with our worksheets will improve question-handling speed and help students understand all technical terms and diagrams.