Skip to content

Aysha022/DSlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CYCLE 1

  1. You are given two arrays sorted in ascending order. Write a C Program to merge the

elements of the two arrays and to form a single array sorted in ascending order.

  1. Given a string s, write a C program to find the length of the longest substring without

repeating characters. Also, display the substring.

  1. Write a program to find the smallest number in a list of integers using pointers.

  2. Implement the following string library functions using pointers:

    4.1. string length (int StringLengh (char *s))

    4.2. string copy (void StringCopy(char *s1, char *s2) )

    4.3. string comparison (int StringCompare (char *s1, char *s2))

    4.4. string concatenation (void StringConcat(char *s1, char *s2) )

  3. Implement bubble sort without using array (Use pointers instead)

CYCLE 2

  1. Implement Linear Search.

  2. Implement Binary Search.

  3. Implement Stack using array.

  4. Write a program in C to check whether a string is palindrome or not, using stack.

CYCLE 3

  1. Using stack, convert an infix expression to a postfix expression and evaluate the

postfix expression.

  1. Write a program to convert an infix expression to a prefix expression using stack.

  2. Implement a Queue using arrays with the operations:

a. Insert elements into the queue

b. Delete elements from the queue

c. Display the contents of the queue after each operation

  1. Implement a Circular Queue using arrays with the operations:

a. Insert elements into the queue

b. Delete elements from the queue

c. Display the contents of the queue after each operation

  1. Implement a Priority Queue using arrays with the operations:

a. Insert elements into the queue

b. Delete elements from the queue

c. Display the contents of the queue after each operation

  1. Implement a Double Ended Queue using arrays with the operations:

a. Insert elements into the queue (both front and rear)

b. Delete elements from the queue (both front and rear)

c. Display the contents of the queue after each operation

CYCLE 4

  1. Write a program to read two polynomials and store them in an array. Calculate the sum

of the two polynomials and display the first polynomial, second polynomial and the

resultant polynomial.

  1. Write a program to enter two matrices in normal form. Write a function to convert two

matrices to tuple form and display it. Also, find the transpose of the two matrices

represented in tuple form and display it. Find the sum of the two matrices in tuple form and

display the sum in tuple form.

CYCLE 5

1.Write a menu driven program for performing the following operations on a linked list

  1. Display

  2. Insert at beginning

  3. Insert at end

  4. Delete from beginning

  5. Delete from end

  6. Create a doubly linked list from a string taking each character from the string. Check if the

string is palindrome in a efficient method.

  1. Implement a stack using linked list with the operations:

  2. Push

  3. Pop

  4. Display the contents of the stack

  5. Implement a queue using linked lists with the following operations

  6. Enqueue

  7. Dequeue

  8. Display the contents of the queue

  9. Write a program to reverese the contents of a queue using stack

  10. Write a program to read two polynomials and store them using linked list. Calculate the

sum of the two polynomials and display the first polynomial, second polynomial and the

resultant polynomial.

  1. Write a program to read two polynomials and store them using linked list. Calculate the

product of the two polynomials and display the first polynomial, second polynomial and the

resultant polynomial.

  1. Write a program for addition of polynomials containing two variables using linked list. The

terms of the polynomials are ordered by the power of the first variable and then the

second variable, in the descending order. Eg: 4.x^3.y^1 + 2.x^2.y^3 +

5.x^1.y^2+7.y^2+7.y^1+5

  1. The details of students (number, name and total mark) are to be stored in a linked list.

Write functions for the following operations.

  1. Insert (at the beginning)

  2. Delete (based on number)

  3. Search (based on name or number)

  4. Sort on the basis of number

  5. Display

CYCLE 6

1.Create a binary tree with the following operations.

  1. Insert a new node

  2. Inorder traversal

  3. Preorder traversal

  4. Postorder traversal

2.Write a program to create a binary search tree (data items are integers) with the following

operations.

  1. Insert a new node

  2. Inorder traversal

  3. Preorder traversal

  4. Postorder traversal

  5. Delete a node

  6. Find the number of leaf nodes

  7. Sort the input numbers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages