DATA STRUCTURES - 23CS52 LAB EXTERNAL EXAMINATION JUNE 2024

DATA STRUCTURES LAB-23CS52


1. A) Write a program to implement the Searching Techniques – Linear & Binary Search.

    B) Develop a program to reverse a linked list iteratively and recursively.

2. A) Write a program to implement the circular queues with possible operations.

    B)Write a program to Implement a stack or queue to compare and check for symmetry of the given string.

3. A) Write a program to Implement a double-ended queue (deque) with essential operations.

    B)Write a program to check for balanced parentheses using a stack.

4. A) Write a program to implement Sorting Techniques – Selection Sort.

    B) Implementing a BST using a Linked List and performing the insertion and deletion of an element.

5. A) Write a program to Implement a circular linked list and perform insertion, deletion, and traversal.

    B)Write a program to evaluate a postfix expression using a stack.

6. A) Write a program to implement Sorting Techniques Insertion Sort.

    B)Write a program to Use a stack to evaluate an infix expression and convert it to postfix.

7. A) Write a program to Implement a stack using arrays and linked lists.

    B)Write a program to implement DLL with possible operations.

8. A) Write a program to implement the Sorting Technique Bubble Sort.

    B)Write a program to Implement a linked list to represent polynomials and perform addition.

9. A) Write a program to implement the Tree traversals.

    B)Write a program to Create a program to detect and remove duplicates from a linked list.

10. A) Develop a program to simulate a simple printer queue system.

    B)Write a program to implement the linear probing collision resolution technique in Hasing.


External Examiner :

Name: K Vijay Kumar

Designation: Associate Professor 

Name of the Organisation: KLU, Guntur.


Internal Examiner :

Name: S SRINIVASA REDDY

Designation: Sr. Assistant Professor 

Name of the Organisation: LBRCE, Mylavaram.







Comments

  1. #include
    #include
    void main()
    {
    int i,n,rev=0;
    char s[4][15];
    clrscr();
    printf("enter n value: ");
    scanf("%d",&n);
    while(n)
    {
    rev=rev*10+n%10;
    n=n/10;
    }
    label:
    switch(rev%10)
    {
    case 1:printf("one");break;
    case 2:printf("two");break;
    case 3:printf("three");break;
    case 4:printf("four");break;
    case 5:printf("five");break;
    case 6:printf("six");break;
    case 7:printf("seven");break;
    case 8:printf("eight");break;
    case 9:printf("nine");break;
    case 0:printf("zero");break;
    }
    rev=rev/10;
    if(rev!=0)
    goto label;
    printf("\nenter a number in words: ");
    scanf("%s %s %s %s",s[0],s[1],s[2],s[3]);
    for(i=0;i<4;i++)
    {
    if(stricmp(s[i],"zero")==0)
    printf("0");
    else if(stricmp(s[i],"one")== 0 )
    printf("1");
    else if(stricmp(s[i],"two")== 0 )
    printf("2");
    else if(stricmp(s[i],"three")== 0 )
    printf("3");
    else if(stricmp(s[i],"four")==0)
    printf("4");
    else if(stricmp(s[i],"five")==0)
    printf("5");
    else if(stricmp(s[i],"six")==0)
    printf("6");
    else if(stricmp(s[i],"seven")==0)
    printf("7");
    else if(stricmp(s[i],"eight")==0)
    printf("8");
    else
    printf("9");
    }
    getch();
    }

    ReplyDelete
  2. #include
    #include
    #include
    void main()
    {
    int n,i;
    char fname[10][20],lname[10][20],gender[10][15],email[10][30],phno[10][15],dob[10][15],address[10][20],password[10][20],uid[30],psw[20];
    clrscr();
    printf("enter how many numbers");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
    printf("enter fname: \n");
    scanf("%s",fname[i]);
    printf("enter lname: \n");
    scanf("%s",lname[i]);
    printf("enter gender: \n");
    scanf("%s",gender[i]);
    printf("enter email: \n");
    scanf("%s",email[i]);
    printf("enter phno: \n");
    scanf("%s",phno[i]);
    printf("enter dob: \n ");
    scanf("%s",dob[i]);
    printf("enter address: \n");
    scanf("%s",address[i]);
    printf("enter password: \n");
    scanf("%s",password[i]);
    }
    printf("successfully registered\n ");
    printf("LOGIN\n");
    printf("enter uid: \n");
    scanf("%s",uid);
    printf("enter password: \n");
    scanf("%s",psw);
    for(i=0;i<n;i++)
    {
    if(stricmp(uid,email[i])==0)
    {
    if(strcmp(psw,password[i])==0)
    {
    printf("successfully login");
    break;
    }
    else
    {
    printf("Password Incorrect");
    printf("Enter Valid Password");
    scanf("%s",psw);
    i--;
    }
    }
    }
    if(i==n)
    printf("Invalide User Credentials \n Login Unseccessful\n");
    getch();
    }

    ReplyDelete

Post a Comment

Popular posts from this blog

MapReduce Matrix Multiplication Code

Word Count MapReduce Code