Program for AVL Tree in C : Assignment

Added on - 15 Mar 2021

  • 46

    Pages

  • 7009

    Words

  • 13

    Views

  • 0

    Downloads

Trusted by +2 million users,
assist thousands of students everyday
Showing pages 1 to 8 of 46 pages
PARUL UNIVERSITYFACULTY OF ENGINEERING & TECHNOLOGYM.Tech. 1st YearCERTIFICATEThis is to certify thatMs.Hardika Jadejawithenrolment no.T0920CE024has successfully completedhis/her laboratory experiments in theAdvanced Data Structures (203202102)from thedepartment ofComputer Science Engineeringduring the academic year2020-21.Date of Submission:......................... Staff In charge:...........................Head Of Department:...........................................
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE &ENGINEERINGM.TECH- COMPUTER ENGINEERINGM.Tech- CE- 1stSemesterSubject::203202102(ADVANCE DATA STRUCTURE)TABLE OF CONTENTSr.NoExperiment TitlePage NoDate ofPerformanceDate ofAssessmentMarks(out of 10)SignFromTo1List the factors that may influencethe space complexity of a program.Write a recursive and non-recursivefunction to compute n!122Write a program to determinewheather or not a character stringhas an unmatched paranthesis usinga stack353Write a program in C toimplement insertion anddeletion in AVL trees6154Write a program toimplement tree traversalin tree16195Write a program to implementDivide and Conqure method tofind the maximum andminimumof N elements20226Write a program in C toimplement Breadth First Search23247Write a program toimplement DFS (Depth-First Search).25268Write a program in C to create aminimum Spanning Tree usingKruskal’s and prime’s algorithm27329Write a program to implementFactorial of N numbers.333310Implement the Rabin-Krapmatcher and Boyer MooreStrings matching algorithms.3436
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No. T0920CE024Page No.Practical-1Aim: List the factors that may influence the space complexity of a program. Write arecursive and non-recursive function to compute n!Program:#include<stdio.h>;#include<conio.h>;Void main();{Int I,r=0,num=1,n,fib;Printf(“enter the number of limit”);Scanf(“%d”,&n);for(i=1;i<=n;i++){Printf(“%d”,r);fib=r=num;r=num;num=fib;}Getch();}
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No. T0920CE024Page No.Output:
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No. T0920CE024Page No.PRIME NUMBER#include<stdio.h>#include<conio.h>void main(){int i,num,j=0,n;clrscr();printf("Enter The Number-");scanf("%d",&n);for(i=1;i<=n;i++){if(n%i==0){j++;}}if(j==2){printf("Number Is Prime",n);}else{printf("Number Is Not Prime",n);}getch();}
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No. T0920CE024Page No.Output:
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No.T0920CE024Page No.Practical-2Aim: Write a program to determine wheather or not a character string has an unmatchedparanthesis using a stack.Program:#include<stdio.h>#include<conio.h>#include<string.h>int top=-1;char stack[100];void push(char);void pop();void find_top();void main(){int i;char a[100];printf("\nRamizraja \n");scanf("%s",&a);for(i=0;a[i]!='\0';i++){if(a[i]=='('){push(a[i]);}
PARUL UNIVERSITY-FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF COMPUTER SCIENCE ENGINEERINGM.TECH- Computer Science EngineeringSubject: 203202102 (Advanced Data Structures)M.Tech- CSE- 1stSemesterEnrollment No.T0920CE024Page No.else if(a[i]==')'){pop();}}find_top();}void push(char a){stack[top]=a;top++;}void pop(){if(top==-1){printf("expression is invalid\n");}else{top--;}}void find_top(){
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document