QuickSort
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions
the given array around the picked pivot. There are many different versions of quickSort that pick pivot in
different ways.
1. Always pick f
ShellSort
ShellSort is mainly a variation of Insertion Sort. In insertion sort, we move elements only one position
ahead. When an element has to be moved far ahead, many movements are involved. The idea of
shellSort is to allow exchange of far items. In s
Punctuation
Item 4319
Name _
Punctuation
Every sentence ends with a punctuation mark.
A period (.) is used at the end of a statement.
A question mark (?) is used when you ask something.
An exclamation point (!) is used to show emphasis or surprise.
Read t
Heap Sort Algorithm
HEAPIFY(A, i)
1
l
LEFT(i)
2
r
3
if l heap-size[A] and A[l] > A[i]
4
then largest
l
5
else largest
i
6
if r heap-size[A] and A[r] > A[largest]
7
then largest
8
if largest
9
then exchange A[i]
10
HEAPIFY(A,largest)
RIGHT(i)
r
i
A[largest
GRAPH COLORING
PRESENTED BY:
FARAH DASTGIR MITF12A005
HALEEMA RABBANI MITF12A049
INTRODUCTION
Ingraph theory,graph coloringis a special case ofgraph labeling
it is an assignment of labels traditionally called "colors" to elements of
agraph subject to ce
IN THE NAME OF ALLAH WHO IS THE MOST MERCIFUL AND THE MOST BENEFICENT
ZULKIFAL-UR-REHMAN
MITF12A051
AZEEM HAFEEZ
MITF12A021
SUBJECT
ANALYSIS OF ALGORITHM
SUMITTED TO
MAM SAADIA SHAHZAD
Date: 03-07-2014
PUNJAB UNIVERSITY COLLEGE OF INFORMATION TECHNOLOGY
P
Precedence in Program Statement
Graph
MITF12A002
MITF12A022
Submitted to: Mam Sadia Shahzad
Precedence in Program Statement Graph
A precedence graph is directed acyclic graphs, where nodes represent
sequential activities, and where arcs, say from node I
COIN CHANGE
PROBLEM
Dynamic Programming
ASIM KHAN
MITF12A030
SALMAN AHMAD MITF12A034
PUNJAB UNIVERSITY COLLEGE OF INFORMATION & TECHNOLOGY
Coin Change
Coin Change is the problem of finding the number of ways of making changes for a particular
amount of ce
Report
Longest Common Subsequence
Group Members:
Usama Ahmad Qureshi MITF12A008
Zulqarnain Saleem MITF12a043
Longest Common Subsequence
Introduction:
The longest common subsequence (LCS) problem is to find the longest
subsequence common to all sequences i
Presentation
Presented By
Junaid Saif
MITF12A009
Presented To
Mam Sadia Shahzad
Coin Change Problem
Finding the number of ways of making changes
for a particular amount of cents, n, using a given
set of denominations C=cfw_c1cd (e.g, the US
coin system: c
PUCIT
Punjab University College of Information Technology
Bipartite Graphs
Group Members:
Syed Johar Hussain MITF12A020
Mutahir Sohail MITF12A053
Bipartite Graph
In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph
whose ve
PUCIT
Punjab University College of Information Technology
Course Prerequisites Graph at University
Group Members:
Zunaira Yousaf MITF12a044
Samreeza Aziz MITF12A050
Course Prerequisites Graph at University
Introduction:
First we have to define a graph the
PUCIT
Punjab University College of Information Technology
Course Prerequisites Graph at University
Group Members:
Zunaira Yousaf MITF12a044
Samreeza Aziz MITF12A050
Course Prerequisites Graph at University
Introduction:
First we have to define a graph the
Mam Sadia Shahzad
Submitted By :
Amna Tahir (MITF12A023)
Sana Amjad (MITF12A013)
Graph Theory in Circuit Analysis
Whether the circuit is input via a GUI or as a text file, at some level the circuit will be represented as a
graph, with elements as edges an
Functions
Chapter 5
FUNCTIONS
Functions allow to structure programs in segments of code
to perform individual tasks.
In C+, a function is a group of statements that is given a
name, and which can be called from some point of the
program. The most common s
Inheritance
Week6 (lect #1)
Inheritance
The
word inherit means to receive. Inheritance enables new
classes to receiveorinheritthe properties and methods of
existing classes.
The new class that can access the members of existing class
is called derived cla
Object Oriented
Programming
Classes and objects
The Object Oriented Approach
The fundamental idea behind object-oriented languages is to combine
into a single unit both data and the functions that operate on that
data. Such a unit is called an object.
A
Constructor &
Destructor
Chapter No. 6
Lecture 6
Accessing member functions
outside the class
The member functions outside the class are defined in similar way as
user defined function are defined.
However, in the header of function definition the scope
Functions
Week 5 (lect#2)
Inline Function
The
inline function is a special
function. It is a user defined
function but in it the function
prototype is omitted. The
keyword inline is used in the
declarator of the function
definition. The function is defin
STRUCTURES
Chapter No. 4
Structure
A structure is a collection of simple variables. The variables in a
structure can be of different types: Some can be int, some can be float,
and so on.
The data items in a structure are called the elements or members o
Week 4 lect 2
Static and const data and member
functions
Static Keyword
We can defne class members static usingstatickeyword. When we
declare a member of a class as static it means no matter how many
objects of the class are created, there is only one co
Week 4 lect# 1
Object as function argument
Assigning Objects
Assigning objects
An object can be assigned to another object of the same type using the
assignment operator (=)
Member by member copy
rational r1,r2,r3,r4;
r3.print();
r4=r3;
r4.print();
O
STRUCTURES
Chapter No. 4
Array type members of
structure
Struct std
cfw_
int code;
float sub[5];
Initializing structure with Array
type members
In case of array type members, the values of elements of array are written enclosed in curly brackets
separat
Fayoum University
Faculty of Computers & Information
Third Year
Introduction to Algorithms
Assignment 1
1. Sort the following functions by their complexity categories from best to worst.
2. Suppose you have a computer that requires 1 minute to solve probl
LECTURE # 8
TOPIC:
ISLAMIC PRACTICES
Different Branches of the
Worship
Namaz
Roza
Zakat
Hajj
After this general discussion on faith,
we will talk at some length, on the four
obligatory modes of worship, Namaz,
Roza, Zakat and Hajj: These items are
include
Exploring ethical brand extensions and
consumer buying behaviour:
the RSPCA and the Freedom Food brand
Morven G. McEachern
Lancaster University Management School, University of Lancaster, Lancaster, UK
Monika J.A. Schroder and Joyce Willock
Queen Margaret
Discovering
Computers 2009
Chapter 1
Introduction to
Computers
Chapter 1 Objectives
Recognize the importance of
computer literacy
Distinguish between system software and
application software
Define the term, computer
Describe the categories of computers
I
Database Management Systems
Course Incharge:
Prof. M. Yousaf Samdani
Objectives of this Course
At the end of this course, you will be able to understand:
l Basic
concepts and important terms
l Importance of Database
l Design stages of DBMS
l At least one