Monthly Archives: October 2015

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 do linear search for an integer in 20 distinct numbers. The program should return the location of an element – 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 do linear search for an integer number in an array of 20 distinct numbers. The program should return the location of an element if… 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 a program that finds the two smallest numbers in an array of n numbers – 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 that finds the two smallest numbers in an array of n numbers. #include<stdio.h> void main() { int I,J,Temp,List[]={6,3,0,4,8,2,5,9,1,7}; clrscr(); printf(“\nElement in Array :\n\n”); for(J=0;J<10;J++) {… Read More »