Skip to content

Abhilash437/Data-Structures

Repository files navigation

Data-Structures

1.Write a function called MINIMUM which takes pointer to first node in a non-empty single linked list of integers, finds and returns the address of a node with minimum key value.

  1. Write a function called INSERT(PF, K) where PF is a pointer to first node in a non-empty single linked list of integers and K is an integer , inserts a new node to the immediate left of the Kth node and returns the updated list.

  2. Write a function called INSERT(PF, K) where PF is a pointer to first node in a non-empty single linked list of integers and K is an integer , inserts a new node to the immediate right of the Kth node and returns the updated list.

  3. Write a function called DELETE which takes pointer to first node in a non-empty single linked list of integers, deletes all node whose keys are negative and returns the updated list.

  4. Write a function called DELETE which takes pointer to first node in a non-empty single linked list of integers, deletes the node following a node with a negative key and returns the updated list.

  5. Write a function called DELETE which takes pointer to first node in a non-empty single linked list of integers, deletes the node immediately preceding a node with a negative key and returns the updated list.

  6. Write a function called APPEND which takes pointers to first node of two non-empty single linked lists of integers, appends the second list to the end of first list and returns the updated list.

  7. Write a function called DESTROY which takes pointer to first node in a non-empty single linked list of integers, destroys all the nodes and returns the updated list.

  8. Write a function called SWAP(N1,N2) where N1 and N2 are pointers to two different nodes in a non-empty(with more than 1 nodes) single linked list of integers, swaps N1 and N2 without creating temporary nodes and returns the updated list.(Note: node N2 comes after N1).

  9. Write a program to create a two dimensional array of integers using single linked list. The node in the first column contains only two pointers as shown in Fig10.1. The left pointer points to the next row. The right pointer points to the data in the row.

  10. Write a function called INSERT(PH, K) where PH is a pointer to Header node in a non-empty circular double linked list of integers with Header and K is an integer , inserts a new node as a predecessor of the Kth node.

  11. Write a function called DELETE(PH, K) where PH is a pointer to Header node in a non-empty circular double linked list of integers with Header and K is an integer , deletes predecessor of the Kth node(if it is not Header).

  12. Write a function called DELETE(PH, K) where PH is a pointer to Header node in a non-empty circular double linked list of integers with Header and K is an integer , deletes successor of the Kth node(if it is not Header).

  13. Write a function called REMOVEINSERT(PH) where PH is a pointer to Header node in a non- empty circular double linked list of integers with Header , removes the last node and inserts to the beginning of the list.

  14. Write a function called SWAP(N1,N2) where N1 and N2 are pointers to two different nodes in a non-empty(with more than 1 nodes) circular double linked list of integers with Header , swaps N1 and N2 without creating temporary nodes .

  15. Write a function called MERGE which merges two sorted lists in to a single sorted list(Single or Double)

  16. Design a menu driven program to perform the following with linked list storage structures i) Create (Read)a polynomial ii) Display a polynomial iii) Evaluate a polynomial iv) Add two polynomials

  17. Design a menu driven program to perform the following with linked list storage structures i) Create (Read)a Long positive integer ii) Display Long positive integer iii) Add two Long positive integers

  18. A university consists of 500 students and there are totally 40 courses for registration. Each student can register maximum of 4 courses. Store the details of registration and generate course wise registration and student wise registration details with linked storage structure.

About

Deleting , Swapping, Merging, 2D array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages