0% found this document useful (0 votes)
10 views

22CA001 CHO Programming Paradigm v0

Uploaded by

kk4020002
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

22CA001 CHO Programming Paradigm v0

Uploaded by

kk4020002
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Course Handout

A. Course Handout (Student & Faculty)

Institute/School Name Chitkara University Institute of Engineering and Technology


Department Name Department of Computer Applications
Programme Name Bachelor of Computer Applications
Course Name Programming Paradigms Session 2024-2025
Course Code 22CA001 Semester/Batch 3rd/2023
L-T-P (Per Week) 4-0-2 Course Credits 5
Course Coordinator Mr. Vikas Rattan

1. Any pre-requisites for the course:


Basic Knowledge of problem-solving skills using any of the procedural language particularly ‘C++‘.

2. Scope and objective of the course:


Object-oriented programming is an important paradigm shift that is followed in almost all modern
computer languages. Object Oriented Programming is based upon theories from the field of cognitive
science about how information is represented in the human mind. The main goal of this course is to make
students understand the importance of object-oriented programming features enabling students to write
generalized code expressing an algorithm or data structure in a way that may be used in a variety of real-
world situations.

The main objectives of the course are: The students should be able to
 To make students learn the implementation of generic programming using templates
 To enable the students to acknowledge the advantages of standard Template Libraries (STL).
 To understand storing and manipulating objects using STL, which makes the program reusable and
robust
 To strengthen the ability of the students to solve problems computationally by utilizing an
understanding of algorithm analysis and data structures.
 To enable the learners to segregate and classify the available data structures into various classes
depending upon storage and their access-associated characteristics
.

2. Course Learning Outcomes:

Course Learning Outcome POs CL KC Sessions

.To implement efficient and excellent code with the PO1, PO2 K2 Conceptual 10
CLO01 data structures and algorithms in the standard Procedural
template library

CLO02 To analyze different techniques for solving problems PO2 K4 Factual 7


like sorting and searching Conceptual

CLO03 Understand the importance of data structures in the PO3 K3 Fundamental 4


context of writing efficient programs. Conceptual

CLO04 Plan the optimum solution, keeping in mind PO7 K4 Conceptual 25


programming language ethics, among various Procedural
solutions using various data structures.

Basic Electronics/ EC22001 Page 1 of 7


Course Handout

Total Contact Hours 46

CLO PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PO13 PO14

CLO1 M L

CLO2 M
CLO3 M M
CLO4 M H L M M

L: Low, M: Medium and H: High

3. ERISE Grid Mapping


Feature Enablement Level(1-5, 5 being highest)

Entrepreneurship 1

Research 1

Innovation 2

Skills 2

Employability 3

4. Recommended Books (Reference Books/Text Books):


• B1: The Complete Reference C++ by Herbert Schildt, Mcgraw Hill Education, Fourth Edition, 2008.
• B2: Object Oriented Programming with C++ by E Balaguruwamy, Mcgraw Hill Education, Seventh
Edition, 2018.
• B3: Data Structures through C++ by Yashwant Kanetkar, BPB Publications, Fourth Edition, 2022
• B4: Data Structures, Seymour Lipschutz, Nineteenth Reprint, Tata McGraw Hill, 2010

5. Other readings & relevant websites:

S. No Link of journals, Magazines, websites, and Research Papers

Link 1 https://www.simplilearn.com/tutorials/cpp-tutorial/cpp-standard-template-library
Link 2 https://www.geeksforgeeks.org/cpp-stl-tutorial/

Link 3 https://byjus.com/gate/introduction-to-data-structure-notes/

Link 4 https://www.hackerearth.com/practice/data-structures

Basic Electronics/ EC22001 Page 2 of 7


Course Handout

6. Recommended Tools and Platforms:


CodeChef, GeeksforGeeks, HackerRank and Leetcode

7. Complete Theory course coverage plan:

Session Recommended
Topic(s)
No. Books (B)
1 Unit-1: Templates/Generic Programming B2
Introduction to generic functions and generic classes
2 -3 Function with two generic types, explicitly overloading a generic function, B1
using standard parameters with template functions generic function
restrictions.
4-5 A class with one and two generic data types, default arguments with B1
template classes
6-7 Unit-2: Standard Template Library (STL) B1 and B2
Overview of STL: Containers, Algorithms, Iterators
8-10 Container Classes: vector, stack, queue, deque, list, map B1 and B2

11-13 Unit-3: Introduction to data structures B4


Classification of data structures, Various operations associated with each
data structure, Algorithm characteristics, Introduction to time-space
complexity of algorithms
14-15 Array Data Structure: Memory Representation of one- and two-dimensional B4
array, Address calculation of element,
16-17 Bubble Sort, Selection Sort, Insertion Sort B4

18-19 Linear Search, Binary Search B4


20 Unit 4: Stack and Queues B3
Application of Stacks, Operations on stacks,
21-22 Polish Notations, Conversion of Polish Notation to infix and vice versa, B4
23-24 Evaluation of Polish expressions, Recursion B1

25-27 Types of Queues, Applications, and Operations on Simple and Circular B3


Queues

28-29 Unit 5: Link List and Trees B3


Applications of link list, classification of link list, Memory Representation,
traversing,
30-31 Insertion and deletion operations on the Singly list B3

32 Implementation of doubly list B3


33 Implementation of Circular linked list B4
34 -35 Stack and Queue implementation using a linked list B4
36 Introduction to tree terminology and Memory representations of binary B4
tree
37-39 Tree Traversal Algorithms B4

40 Tree Construction for tree traversals B4


41-43 Insertion and deletion in binary search tree B4

Basic Electronics/ EC22001 Page 3 of 7


Course Handout

44-46 Merge sort and Quick sort B4


End Term

8. Delivery/Instructional Resources:

Session
No. Topic(s) Web References Audio/Video

1 Generic http://users.cis.fiu.edu/~weiss/ https://archive.nptel.ac.in/courses/


Programmin Deltoid/vcstl/templates 106/105/106105234/
g
2 STL https://www.geeksforgeeks.org/the- https://archive.nptel.ac.in/courses/
c-standard-template-library-stl/ 106/105/106105234/
3 Remaining https://www.javatpoint.com/data- https://nptel.ac.in/courses/106102064
Units structure-tutorial
4 Merge Sort https://www.khanacademy.org/ https://www.youtube.com/watch?
computing/computer-science/ v=mB5HXBb_HY8
algorithms/merge-sort

5 Quick Sort https://is.gd/Cbj04n https://www.youtube.com/watch?


v=QN9hnmAgmOc

9. Action plan for different types of learners:


Slow Learners Average Learners Fast Learners
Remedial Classes Doubt Sessions Advanced Quiz/ Projects

10. Evaluation Scheme & Components:


Evaluation No. of Weightage of Mode of
Type of Component
Component Assessments Component Assessment
#
Lab Evaluations 03* 30% Offline
Component 1
Component 2 Sessional Tests (STs) 02
** 20% Offline
#
End Term Examination 01*** 50% Offline
Component 3
Total 100%

#Component 1 and component 3 are mandatory components and require 40% marks in each for clearing the subject.
*Lab Evaluation have2 Lab performances- LP1 and LP2 and one Internal viva which shall be considered for evaluation based on
experiments.
**Out of 02 STs, the ERP system automatically picks the best 01 ST.
***Further, as per Academic Guidelines, minimum 75% attendance is required to become eligible for appearing in the End Semester
Examination.

11. Complete Lab Course Coverage plan


Session Lab Session Virtual lab link/ Multisim
No. (all the programs must be written using classes and objects link
etc. i.e. OOPS paradigms)
1 Write down a program to sort an array using function templates.

Basic Electronics/ EC22001 Page 4 of 7


Course Handout

2 Given an array V[] of size R, the task to reverse the array using https://
Stack. www.geeksforgeeks.org/
reverse-an-array-using-stack/
Input: arr[] = { 10, 20, 30, 40, 50 }
Output: 50 40 30 20 10
Explanation: Reversing the array modifies arr[] to { 50, 40, 30, 20, 10
} Therefore, the required output is 50 40 30 20 10.

There are 2 approaches to solve this problem use both the


approaches (stack / STL )
3 Given an expression (a+(b-c)) *({d-e}/ [f+g-h]) , write a program to https://
examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” www.geeksforgeeks.org/check-
are correct in the given expression. for-balanced-parentheses-in-an-
expression/
4 Implement a simple queue using an array and perform the following
operations.
Enqueue(): For adding elements in the queue
Dequeue(): For Deleting elements in queue
isEmpty(): returns 1 if the queue is empty else 0.
isFull():returns 1 if the queue is full else 0.
printContent(): For printing elements of the queue

5 Implementation of statement at Sr. No 4 via Standard Template


libraries.
6 Implementation of the circular queue of any data types.

7 Write down a program to create and traverse a link list of n nodes.

8 Given a linked list of length N and an integer K , append the last K


elements of a linked list to the front. Note that K can be greater
than N.

Input Format
First line contains a single integer N denoting the size of the linked
list.
Second line contains N space separated integers denoting the
elements of the linked list.
Third line contains a single integer K denoting the number of
elements that are to be appended.
Constraints
1 <= N <= 10^4
1 <= K <= 10^4

Output Format
Display all the elements in the modified linked list.
Sample Input
7
1221856
3
Sample Output
8561221

9 Given a linked list with n nodes. Find the kth element from last

Basic Electronics/ EC22001 Page 5 of 7


Course Handout

without computing the length of the linked list.


Input Format
First line contains space separated integers representing the node
values of the linked list. The list ends when the input comes as '-1'.
The next line contains a single integer k.
Constraints
n < 10^5
Output Format Output a single line containing the node value at the
kth element from last.
Example:
Sample Input
1 2 3 4 5 6 -1
3
Sample Output
4
Note: The linked list is 1 2 3 4 5 6. -1 is not included in the list. So the
third element from the last is 4
10 Insert nodes from the second list into the first list at alternate
positions in the first list, given two linked lists.
For instance, if the first list is 15->17->117->113->111 and the
second list is 22->20->22->24->26, the first list should be replaced
with 15->22->17->20->117->22->113->24->111->26 and the second
list should be left empty. The nodes of the second list should be
inserted only when there are available positions.
11 Write down a program to calculate the factorial of a number greater
than 20.
12 Implement a binary tree and write its traversals.

12. Syllabus of the Course:


Name of the course: Basic Electronics Subject Code: EC22001

Contents No. of Weightage


Lectures
Unit-1: Templates/Generic Programming
Introduction to generic functions and generic classes, Function with two generic
05 10%
types, explicitly overloading a generic function, using standard parameters with
template functions generic function restrictions
Unit-2: Standard Template Library (STL)
Overview of STL: Containers, Algorithms, Iterators, Container Classes: vector, 05 15%
stack, queue, deque, list, map
Unit 3: Introduction to data structures
Classification of data structures, Various operations associated with each data
structure, Algorithm characteristics, Introduction to time-space complexity of
09 20%
algorithms, Array Data Structure: Memory Representation of one- and two-
dimensional array, Address calculation of elements, Linear Search, Binary
Search
Unit 4: Stack and Queues
Application of Stacks, Operations on stacks, Polish Notations, Conversion of
08 25%
Polish Notation to infix and vice versa, Evaluation of Polish expressions,
Recursion, Types of Queues, Applications, and Operations on Simple and Circular

Basic Electronics/ EC22001 Page 6 of 7


Course Handout

Queues
Unit 5: Link List and Trees
Applications of link list, classification of link list, Memory Representation,
traversing, Insertion and deletion operations on the Singly list, Implementation
of doubly list, Implementation of Circular linked list, Stack and Queue
implementation using a linked list, Introduction to tree terminology and 19 30%
Memory representations of binary tree, Tree Traversal Algorithms, Tree
Construction from tree traversals, Insertion and deletion in binary search tree,
Merge sort and Quick sort

13. Academic Honesty policy:


Chitkara University ensures the implementation of the highest level of academic integrity in all the documents
being prepared / adopted by its Faculty members and students.
Any branch of the same will be tantamount to severe academic penalties.

This Document is approved by:


Designation Name Signature
Course Coordinator Vikas Rattan
Program Incharge Dr. P. S. Brar
Pro VC Dr. Jaiteg Singh
DD/MM/YYYY 25/June/2024

 CLO03: Select basic data structures and algorithms for autonomous realization of simple programs or
program parts
 CLO04: Know the importance of memory management through dynamic memory allocation and make
use of memory efficient data structure like linked list.
 CLO05:: Describe the divide-and-conquer paradigm and explain when an algorithmic design situation
calls for it. Recite algorithms that employ this paradigm. Synthesize divide-and-conquer algorithms.
Derive and solve recurrences describing the performance of divide-and-conquer algorithms.
 CLO06: : Ability to sensibly select appropriate data structures and algorithms for problems and to
justify that choice.

Basic Electronics/ EC22001 Page 7 of 7

You might also like