Array Structure Proposal
To provide a programming solution to a problem, certain procedures must be taken. First and foremost, the problem has to be analyzed and totally understood in order to develop a blue print (algorithm) of the problem. Secondly, the algorithm (blue print) has to be developed; the next steps are: design a program for the problem, code the program, test or run the program and then review the results. The process involves utilizing the programming cycle which follows the programming fundamentals of input, process and output. The process requires the use of syntax, modules, shapes, operations, a computer language, and subsequently involves selection structure and array structure proposal. “An array is a collective name given to a group of similar quantities. These similar quantities could be percentage marks of 100 students, number of chairs in home, or salaries of 300 employees or ages of 25 students. Thus an array is a collection of similar elements. These similar elements could be all integers or all characters, and so on” (Thompson, 2007). In the Church of Christ scenario addressed in the Programming Solution Paper (week 1), Selection Structure Paper (week 2) the Pastor of the church wants to know the real-time (monthly) information of how much money in tithes and offerings is collected from the (500) church attendees. The problem has been analyzed, and an algorithm developed. The program designing process necessitates the use of a selection structure and array structure. A section (name of church attendees and contributions) of the Selection Structure that requires an array structure has been selected. The purpose of this segment is to input the names of the church attendees and the total monthly contributions into two arrays (Names and Contributions) and find out the church attendee that made the most contributions (Max). Below is the flow chart for the pseudo code described below.

...NAME: ___________________________ SECTION: _____________
I. Multiple Choice: Encircle the best answer. (20 pts)
1. It is a data structure that contains an undefined number of elements
a. Static array
b. Stacks
c. Dynamic array
d. Pointers
2. Given the expression 2 / 5 * 6 / ( 7 + 8 – 9 * 1 ) – 2 * 3, its postfix equivalent is:
a. 2 5 / 6 * z 8 / 9 1 * – 2 3 * –
b. 2 5 / 6 * z 8 + 9 1 * – 2 3 / * –
c. 2 5 / 6 * z 8 + 9 1* – / 2 3 * –
d. 2 5 6 * / z 8+ 9 1 * – / 2 3 * –
3. Given the expression 4 6 5+ * 3 – , its infix notation is:
a. 4 + ( 6 * 5 ) – 3
b. 4 * 6 + 5 – 3
c. 4 + 6 * 5 – 3
d. 4 * ( 6 + 5 ) – 3
4. Initializing a two-dimensional array is:
a. type arrayname[column][row];
b. type arrayname[x][y];
c. type arrayname[row][column];
d. type arrayname[y][x];
5. Initializing Linked lists would require the use of:
a. trees
b. linked list
c. list variable
d. pointers
6. The number of fields per node required in a doubly circular linked list is
a. 1
b. 2
c. 3
d. 4
Given the linked list below, answer # 7 – 10
7. What is the address located at e?
a. 600
b. 500
c. 100
d. NULL
8. What is the address located at f?
a. 600
b. 500
c. 100
d. NULL
9. What is the address of the value BAPA?
a. 600
b. 200
c. 100
d. NULL
10. What is the address located at a?
a. 100
b. 200
c. 1000
d. NULL
II. MODIFIED TRUE OR FALSE. Write TRUE on...

...Department of Computer Science
COURSE DESCRIPTION
Course Code
CS-203
Course Title
Data Structures
Credit Hours
4
Category
Core
Prerequisite
Knowledge and Experience in Programming Fundamentals and Object Oriented Programming
Expertise in design, implementation, testing, and strong debugging of object-oriented programs.
Inner Classes and Exception Handling
Amis and Objectives
“An apprentice carpenter may want only hammer and saw, but a master craftsman employs many precision tools. Computer programming likewise requires sophisticated tools to cope with complexity of real applications and only practice with these tools will build skill in their use. (Robert L. Kruse Data Structure and Program Design)”. This subject deals to make students convenient in building a memory and time efficient data structures for the implementation of large-scale (data intensive) computer systems.
Learning Outcomes
Along with many others following are fundamentals learning outcomes for students that are expected through this course
Apply appropriate fundamental data structures and abstract data types (ADT) such as bags, lists, stacks, queues etc and heaps: min/max heap, min-max heap and some advance hierarchal data structures like B-Trees: 2-3 tree, 2-3-4 tree and hash tables, and graphs in problem solving.
Apply object-oriented principles of polymorphism, inheritance, and generic programming when implementing data...

...0-200 Rs.0.50 per unit 201-400 Rs.100 plus Rs.0.65 per unit excess 200 401-600 Rs.230 plus Rs.0.80 per unit excess of 400. Write a C program that reads the customer number and power consumed and prints the amount to be paid by the customer. 17) Program to find the roots of the quadratic equation using bisection method.
UNIT-II
18) Write a program to print the elements of an array in reverse order. 19) Write a program to add all the elements of a two dimensionalarray. 20) Write a program to find the transpose of a given matrix.
21) Write a program to find the smallest and largest element in a two dimensional array. 22) Write a program to illustrate call by value. 23) Write a function to calculate the factorial of a given number. 24) Write a function to sort the elements of an array. 25) Write a recursive function to find the roots of the quadratic expression using bisection method. 26) Write a program to copy string to another without using string handling functions. 27) Write a program to check whether a given string is a palindrome or not. 28) Write a function to find the largest element in an array. 29) Write a recursive function power (base, exponent) that when invoked returns base exponent. 30) Program to sort the characters in a given string. 31) Write a function to convert all the upper case letters to lower case and lower case letters to upper case in a given string. 32) Program to...

...L10: Stacks
UCCD1024 Data Structures
What you will learn today?
What are stacks?
Why study stacks? How to implement stack using linked list? How to apply the stack concept in application?
This is our emphasis here.
Read Textbook 1: Chapter 7.
L10: Stack Jan 2013 2
What are stacks?
It is a special kind of list. The operations of insert (called push) and delete (called pop) are allowed only at one end (i.e., top). It has the property of LIFO: Last In First Out. Less general than list and easier to implement because no insertion and deletion at random locations.
L10: Stack Jan 2013
item4 item3 item2 Take this Insert here item1 one out
without moving other items?
X
without removing item4?
3
X
What you will learn today?
What are stacks?
Why study stacks?
How to implement stack using linked list? How to apply the stack concept in application?
This is our emphasis here.
L10: Stack Jan 2013
4
Why study stacks?
A lot of problems have the LIFO characteristics. With the data structure of stacks that support LIFO, one can easily create LIFO operations for them. Problems that need LIFO: moving a stack of boxes (the removal order is LIFO)
1 2 3 4 5 6
7
L10: Stack Jan 2013
5
Why study stacks?
A lot of problems have the LIFO characteristics. With the data structure of stacks that support LIFO, one can easily create LIFO...

...Parallel arrays and arrays of structures
An array of structures are usually equivalent to parallel arrays of the components.
For example, if each student record consists of an ID number and a GPA value, then a list of students can be represented as an array of structure:
The same data can be stored as two arrays that "parallel" to each other, in the sense that the same index in them indicate data for the same student:
Usually the first way is more natural and convenient.
Advantages and disadvantages
Against Arrays
Compared to arrays, linked data structures allow more flexibility in organizing the data and in allocating space for it. With arrays, we must choose a size for our array once and for all; this can be a potential waste of memory. A linked
Data structure is built dynamically and never needs to be bigger than the programmer requires. It also requires no guessing in terms of how much space you must allocate when using a linked data structure. This is a feature that is
Key in saving wasted memory. The nodes of a linked data structure can also be moved individually to different locations without affecting the logical connections between them, unlike arrays. With due care, a process can add or delete...

...Department of Information Technology
LAB MANUAL
IT2205 – Data Structures and Algorithm Lab
INDEX
1. Array Implementation Of Stack
2. Application Of Stack – Conversion Of Infix To Postfix
3. Implementation Of Linear Queue Using Arrays
4. Array Implementation Of Circular Queue
5. Linked List Implementation Of Stack
6. Singly linked list – Linked list implementation
7. Doubly linked list – Linked list implementation
8. Polynomial Manipulation
9. Tree Traversals
10. Expression Tree
11. Priority Queue Using Heap
12. Hashing Technique
13. Dijkstra’s Algorithm
14. Back tracking algorithm – knap sack problem
Ex. no.: 1
Date :
ARRAY IMPLEMENTATION OF STACK
Aim
To write a C-program to implement stack using array data structure.
And perform the following stack operations
1. POP
2. PUSH
3. PEEP
Algorithm
STEP 1:Start
STEP 2:Initialize stack, will=1,i, num
STEP 3:Add element in stack
PUSH(S,TOP,X)
3.a. [Check overflow condition]
If(TOP>=N) then
Write(“Stack is full”)
3.b. [Insert element]...