# Tag Archives: algorithm

## Write an Algorithm and a Program that accepts a Binary Tree as input and checks whether it is a Height Balanced Tree – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-033 Course Title : Data and File Structures Lab Assignment Number : BCA(III)/L-033/Assignment/2015 Maximum Marks : 50 Weightage : 25% Write an Algorithm and a Program that accepts a Binary Tree as input and checks whether it is a Height Balanced Tree. #include <stdio.h> #include <stdlib.h> struct tnode… Read More »

## Write a program to sort data using a selection sort algorithm – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-045 Course Title : Introduction to Algorithm Design Lab Assignment Number : BCA(IV)/L-045/Assignment/2015 Maximum Marks : 50 Weightage : 25% Write a program to sort data using a selection sort algorithm. #include<stdio.h> void main() { int MIN,MIN_POS,I,J,TEMP,List[]={6,3,0,4,8,2,5,9,1,7}; int N=10; clrscr(); printf(“\n****SELECTION SORT****\n”); printf(“\n\nList Before Sorting :\n\n”); for(J=0;J<N;J++) {… Read More »

## Implement merge sort algorithm – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-045 Course Title : Introduction to Algorithm Design Lab Assignment Number : BCA(IV)/L-045/Assignment/2015 Maximum Marks : 50 Weightage : 25% Implement merge sort algorithm.   #include<stdio.h> int numbers[10]={2,8,4,1,0,7,9,3,5,6}; int temp[10],array_size=10; void mergeSort(int numbers[],int temp[],int array_size); void m_sort(int numbers[],int temp[],int left,int right); void merge(int numbers[],int temp[],int left,int mid,int right);… Read More »

## Write an algorithm for the implementation of a multiple queues in a single dimensional array – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Data and File Structures Assignment Number : MCA(II)/021/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Implement multiple queues in a single dimensional array. Write algorithms for various queue operations for them .   #include <stdio.h> #define MAX 20 void insert_que1(int *,int *,int *,int); void insert_que2(int… Read More »

## Write an algorithm for the implementation of a Dequeue – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Data and File Structures Assignment Number : MCA(II)/021/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Write an algorithm for the implementation of a Dequeue .   #include <stdio.h> #define max 10 int top1, top2, stk_arr[max]; void push(); void pop(); void display(); void main() { int… Read More »

## Write an algorithm and draw a corresponding flowchart to create a simple multiple choice question (MCQ) examination of 25 questions for 50 marks along with evaluation process too – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(I)/011/Assignment/15-16 Maximum Marks : 100 Weightage : 25%  Q1. Define a flowchart. Write an algorithm and draw a corresponding flowchart to create a simple multiple choice question (MCQ) examination of 25 questions for 50 marks along with evaluation process… Read More »

## Write an algorithm and draw flowchart to find whether a given string S1 is substring of another string S2. 10m Dec2007

Write an algorithm and draw flowchart to find whether a given string S1 is substring of another string S2. 10m Dec2007   Algorithm Step 1: Input String and Substring (Note: Substring should be smaller than String) Step 2: Find Length of String (Len1) and Find Length of Substring (Len2) Step 3: flag <- 0 Step… Read More »

## Design an algorithm, draw a corresponding flow chart and write a ‘C’ program for Binary Search, to search a given number among the list of numbers. 10m Dec2007

Design an algorithm, draw a corresponding flow chart and write a ‘C’ program for Binary Search, to search a given number among the list of numbers. 10m Dec2007   Algorithm Step 1: Declare an array ‘k’ of size ‘n’ i.e. k(n) is an array which stores all the keys of a file containing ‘n’ records… Read More »

## A C program and algorithm to implement Circular Doubly Linked List – IGNOU MCA Assignment 2014 – 15

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Data and File Structures Assignment Number : MCA(2)/021/Assign/2014-15 Maximum Marks : 100 Weightage : 25%   Write an algorithm for the implementation of Circular Doubly Linked Lists.   #include<stdio.h> struct node { int data; struct node *next; struct node *prev; }; typedef struct node… Read More »