Skip to content

Instantly share code, notes, and snippets.

View omermuneer's full-sized avatar

Omer Muneer Qazi omermuneer

View GitHub Profile
omermuneer / comp303-31aug15.txt
Created August 31, 2015 06:25
comp303 - 31aug15
Algorithms Mid - Training!
Solution by Dr. Atif Alvi
Dated: August, 31 2015 (Fall 2015)
Course: Design and Analysis of Algorithms
Course Code : Comp 303
#Standard Deviation
omermuneer / gist:29f238d8a1bf9c50c1c9
Created June 29, 2015 05:56
Dsicrete Mathematics - Mid solutions - 29th June
Question - 1 Ǝ ∀ ˄˅
a) A(Lois,Prof Michael)
b) ∀x S(x)-->A(x,Prof Gross)
d) Some student has not asked any faculty member a question
Ǝx (S(x)˄∀y(F(y)-->~A(x,y) ) )
omermuneer / DM-25Jun
Created June 25, 2015 05:53
Dsicrete Mathematics - Revision - 25th June - ROSEN - Discrete Math & its Applications
Discrete Math - solutions - Exercise 5.4
Page no 370
Q7. Give a recursive definition and algorithm for computing nx whenever n is a positive integer and x is an integer, using just addition.
P(0): x(0) = 0
Nx = x+(n-1)x
Procedure mult (n: positive integer, x: integer)
if n=1 then mult(n,x):=x
else mult(n,x):=x+mult(n-1,x)
#include <list>
using namespace std;
// Graph class represents a directed graph using adjacency list representation
class Graph
int V; // No. of vertices
list<int> *adj; // Pointer to an array containing adjacency lists