Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
179 views3 pages

DSAL - Assignment 1 Format

This document provides guidelines for Assignment 1 on searching and sorting algorithms. Students are asked to: 1. Implement bubble, insertion, and quicksort on an array of student records to sort by roll number, name, and GPA. 2. Perform linear and binary searches on the student array to find students by GPA and name. 3. Write test cases to validate the inputs and outputs of each sorting and searching algorithm, including edge cases. 4. Provide analysis of the time complexity for each algorithm in a comparison table. The assignment aims to demonstrate proficiency with arrays, structures, sorting and searching algorithms.

Uploaded by

Vaishnavi Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views3 pages

DSAL - Assignment 1 Format

This document provides guidelines for Assignment 1 on searching and sorting algorithms. Students are asked to: 1. Implement bubble, insertion, and quicksort on an array of student records to sort by roll number, name, and GPA. 2. Perform linear and binary searches on the student array to find students by GPA and name. 3. Write test cases to validate the inputs and outputs of each sorting and searching algorithm, including edge cases. 4. Provide analysis of the time complexity for each algorithm in a comparison table. The assignment aims to demonstrate proficiency with arrays, structures, sorting and searching algorithms.

Uploaded by

Vaishnavi Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PUNE INSTITUTE OF COMPUTER TECHNOLOGY

INFORMATION TECHNOLOGY

ACADEMIC YEAR -2022-23

ASSIGMENT 1 WRITEUP FORMAT for DSAL Lab

Title Assignment 1: Searching and Sorting

Aim To implement Searching and Sorting on Array as a linear Data structure

Problem Consider a student database of SEIT class (at least 15 records). Database contains different
statement
Fields of every student like Roll No, Name and SGPA.(array of structure)

a. Design a roll call list, arrange list of students according to roll numbers in ascending

order (Use Bubble Sort)

b. Arrange list of students alphabetically. (Use Insertion sort)

c. Arrange list of students to find out first ten toppers from a class. (Use Quick sort)

d. Search students according to SGPA. If more than one student having same SGPA,

then print list of all students having same SGPA.

e. Search a particular student according to name using binary search without recursion.

(all the student records having the presence of search key should be displayed)

(Note: Implement either Bubble sort or Insertion Sort.)

Objective • To study the concepts of array of structure.


• Know the concepts, algorithms and applications of Sorting.
• Understand the concepts, algorithms and applications of Searching.
Outcome • Understand linear data structure - array of structure.
• Apply different sorting techniques on array of structure (Bubble,
• Insertion and Quicksort) and display the output for every pass.
• Apply different searching techniques on array of structure (Linear
Search, Binary Search) and display the output for every pass..

• Calculate time complexity.


Theory Theory ::

1. Concept of Linear data structure


2. Example of Linear data structure
3. Array:: (1 D Array)
i. Concepts

ii. Definition of Array

iii. Need of Array

4. ADT of Array
i. Write proper ADT format
(ADT should not include any implementation concept)

5. Graphical representation of an array (show following points)

Kirti Digholkar DSAL Assignment 1


PUNE INSTITUTE OF COMPUTER TECHNOLOGY

INFORMATION TECHNOLOGY

i. Memory Map of Array

i. . ii. Terminology with Array (base address, constant pointers, Index, Subscript)
ii. iii. Address calculations in Array
6. Array and structure in C++
7. Declaration, initialization, input output of array in C++
8. Applications of array
9. Basics of structure data types in C++
10. Array of structures in C++ declaration, definition, input, output
11. Assignment one database definition of your choice
12. Basics of searching and sorting
13. Application of searching and sorting

Algorithms 1. Explain linear search with example and pseudocode


/Pseudocode:
2. Explain Binary search with example and pseudocode

3. Explain Bubble sort with example and pseudocode

4. Explain Insertion Sort with example and pseudocode

5. Explain Quick Sort with example and pseudocode

Conclusion Add the comparative study and analysis in tabular format

1. All sorting algorithms: consider following factors for comparison :


Time complexity : best, average worst , Space complexity, stable sort or not,
methods used for sorting

2. Searching algorithms: Consider following factors for comparison:


1. Time complexity : best, average, worst
2. Input list constraint
3. Methods used for sorting.

Kirti Digholkar DSAL Assignment 1


PUNE INSTITUTE OF COMPUTER TECHNOLOGY

INFORMATION TECHNOLOGY

Following points are expected in program.

Test Validations :
cases/validation
• Limit of the array should not be –ve, and should not cross the lower and upper bound.
• Roll numbers should not repeat, should not -ve
• Name should only contain alphabets, space and .
• Should not allowed any other operations before the input list is entered by the user .
• Before going to (binary search) records should be sorted according a names.

Test Cases

Sorting :

1. Four test cases :


2. Already Sorted according to the requirement
3. Sorted in reverse order
4. Partially sorted
5. Completely Random List
→Show pass wise output , including no of comparisons and swaps needed

Searching :

1. Search element at first, middle, last position.


2. Search element is not in the list
Program Printout /Softcopy

Results /output Including test cases , validations and valid inputs based results .

Kirti Digholkar DSAL Assignment 1

You might also like