2017 universities Ranking in Pakistan

Here are overall top universities of Pakistan.Some universities are at the top place in engineering fields but others are at Applied science, BA and in IT programs

Sunday, 23 December 2018

Tree traversal (preorder,inorder,postorder) using linklist (c++)

#include<iostream> using namespace std; struct node {     int data;     struct node *left;     struct node *right; }; /**********Element insertion*****************/ node* insert(node *root,int data) {     if(root==NULL)     {         root=new node();         root->data=data;         root->left=root->right=NULL;  ...

Saturday, 22 December 2018

Implementation of queue using linklist (C++)

#include<iostream> using namespace std; struct queue {     int data;     struct queue *next; };  queue *front=NULL;  queue *rear=NULL;     int count=0; /**********Inserting Element in Queue******************/ void enqueue(int x) {   queue *temp;   temp=new queue();   temp->data=x;   temp->next=NULL;   if(front==NULL && rear==NULL)   {      ...

Sunday, 16 December 2018

Circular queue using array(insertion, deletion)

#include <iostream> using namespace std; int Q[10]; int size=10; int count=0; int rear=0; int front=0; void enQ(int element) {    if(count==size)    {        cout<<"Queue Overflow"<<endl;    }    else    {        Q[rear]=element;        rear=(rear+1)%size;        count++;  ...

Doubly Linklist (insertion,deletion of a node)

#include <iostream>using namespace std;struct node2{    int data2;    struct node2 *previous;    struct node2 *next2;};int main(){    node2 *head2;    node2 *last2;    node2 *temp2;    last2=0;    int choice;    do    {    cout<<"Enter data in Doubly node:"<<endl;    temp2=new node2();    cin>>temp2->data2; ...