[Solved] Data Structures and Algorithms (CS F211) Lab Sheet 1

$25

File Name: Data_Structures_and_Algorithms_(CS_F211)_Lab_Sheet_1.zip
File Size: 489.84 KB

SKU: [Solved] Data Structures and Algorithms (CS F211) Lab Sheet 1 Category: Tag:
5/5 - (1 vote)
  1. Given any n x n matrix, write a C program to find the saddle point of the matrix. A saddle point is an element of the matrix such that it is the minimum element in its row and maximum in its column. The size and the elements of the matrix are given as user inputs. In case the matrix does not contain a saddle point, your code should be able to determine that as well.
  1. Write a C program to create a number spiral of the form depicted below arranged as an n x n matrix. n is given as user input.
  1. Modify the above program to put only prime numbers in the number spiral. Sample:
59 53 47 43 41
61 11 7 5 37
67 13 2 3 31
71 17 19 23 29
73 79 83 89 97
  1. Write a C program to find the Kth node from the end in the singly, doubly and circular linked list?
  1. Write a C program with three functions: (i) Function Search(x) that search for a node containing a given data (as search keyword), (ii) Function Delete(x) that keeps the node (that has first occurrence of the given data x) and deletes the other nodes (that has rest of the occurrences of x) and then (ii) Function Swap that swaps the node (that has first occurrence of the given data) with the next node. E.g. if the list 2->9->3->8>3->5->2->3, using search(3), the program shall find the three occurrences, using Delete(3), the output is 2>9->3->8->5->2 and using swap(), the output of the program is 2->3->9->8->5->2.
  1. Given two numbers a and b, write a C program to find prime numbers between a and b (both a and b are included).
  1. Write a C program to encode a given message. The encoding algorithm first transforms every alternate character (excluding spaces) into its third successor in the series and then performs reverse operation on each word. For an example, the message have a good day will be first transformed as kaye d grog ddy and then reversed as eyak d gorg ydd. Your program should also be able to decode a given coded message into its original form i.e. if I give an encoded message it should decode the original message. Ignore the white spaces while looking for the alternate characters.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Data Structures and Algorithms (CS F211) Lab Sheet 1
$25