You are on page 1of 5

Data Structures using C

Array and String

1. WAP to check whether the values given by the user forms a Magic square or not. (A
magic square is one whose sum of all the rows, all the columns and the diagonals are
equal).

2. WAP to find the length of a string without using strlen().

3. WAP to concatenate two strings without using strcat().

4. WAP to reverse a string without using strrev().

5. WAP to check whether a given string is a palindrome or not.

6. WAP to implement string copy without using strcpy().

7. WAP to implement string comparison without using strcmp().

8. WAP to get a substring from an entered string.

9. WAP to sort string of names given by the user.

10.WAP to search for a pattern in a string.

11.Develop a function ConcatReverse (s1, s2) which concatenate the reverse of string s2
into s1.

Linked Lists

1. WAP that will create a singly linked list of integers and display the items.

2. WAP that will create a singly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks

i) Insert an item at the beginning of the list.

ii) Insert an item at the end of the list.

iii) Insert an item any where in between the terminal nodes.

3. WAP that will create a singly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks

i) Delete an item from the beginning of the list.


Data Structures using C

ii) Delete an item from the end of the list.

iii) Delete an item from any where in between the terminal nodes

4. WAP that will create two singly linked lists and then merge them into a singly list
where

i) The original lists will be retained

ii) The original lists may not be retained

5. WAP that will search for an element in a singly linked list

6. WAP that will reverse a singly linked list.

7. WAP that will remove the redundant nodes in a singly linked list.

8. WAP that will create a list by selecting the alternate items of a given list

9. WAP that will create a list by selecting the items alternatively from two singly linked
lists.

10.WAP that will count the non-zero elements, odd elements and even elements of a
singly linked list.

11.WAP to create the union of two singly linked lists.

12.WAP to create the intersection of two singly linked lists.

13.WAP that will display the elements of a linked list by traversing the nodes spirally.
E.g. if a given linked list is 12  14  16 18  20  25 the spiral display will be 12
25 14 20 16  18.

14.WAP that will create a doubly linked list of integers and display the items in both
forward and backward direction.

15.WAP that will create a doubly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks

iv) Insert an item at the beginning of the list.

v) Insert an item at the end of the list.

vi) Insert an item any where in between the terminal nodes.

16.WAP that will create a doubly linked list of integers and display the items. Design a
menu driven program that will perform the following tasks
Data Structures using C

iv) Delete an item from the beginning of the list.

v) Delete an item from the end of the list.

vi) Delete an item from any where in between the terminal nodes

17.WAP that will create two Doubly linked lists and then merge them into a singly list
where

iii) The original lists will be retained

iv) The original lists may not be retained

18.WAP that will search for an element in a Doubly linked list

Sparse Matrices and Polynomial Operations

1. WAP that will create a sparse matrix by taking integer elements from the user and
then display both the sparse matrix and transpose of the sparse matrix.

2. WAP that will create two sparse matrices by taking integer elements from the user
and then add them. Also display each of the matrices.

3. WAP that will create two sparse matrices by taking integer elements from the user
and then add them by using linked lists. Also display each of the matrices.

4. WAP to add two polynomials using array.

5. WAP to add two polynomials using linked lists.

6. WAP to multiply two polynomials using array.

7. WAP to multiply two polynomials using linked lists.

Stack and Queue


Data Structures using C

1. WAP to implement stack operations like push, pop and display using array.

2. WAP to implement stack operations like push, pop and display using linked list.

3. WAP to convert an infix expression to its corresponding postfix expression.

4. WAP to evaluate a postfix expression.

5. WAP to convert an infix expression to its corresponding prefix expression.

6. WAP to evaluate a prefix expression.

7. WAP to reverse a given string using stack.

8. WAP to check nesting of parentheses using stack.

9. WAP that will implement the queue operations like insert, delete and display using
array.

10.WAP that will implement the queue operations like insert, delete and display using
linked list.

11.WAP to implement the operations of a queue using circular linked list.

12.WAP that will implement the circular queue operations like insert, delete and display
using array.

13.WAP that will implement the circular queue operations like insert, delete and display
using linked list.

14.WAP to implement DE queue using linked list.

15.WAP to implement priority queue using linked list.

Sorting and Searching

1. WAP to sort the elements of an array using Bubble sort technique.

2. WAP to sort the elements of an array using insertion sort technique.

3. WAP to sort the elements of an array using Selection sort technique.

4. WAP to sort the elements of an array using Quick sort.


Data Structures using C

5. WAP to sort the elements of an array using Merge sort without using recursion.

6. WAP to sort the elements of an array using Merge sort with using recursion.

7. WAP to sort the elements of an array using Quick sort technique.

8. WAP to sort the elements of an array using Heap sort technique.

9. WAP to sort the elements of an array using Radix sort.

10.WAP to sort the elements of an array using Shell sort.

11.WAP to sort the elements of an array using Address Calculation sort.

12.WAP to search an item in a list of items using sequential search technique.

13.WAP to search an item in a list of items using binary search technique.

You might also like