C Programs Are Asked in This Section: Ans. O (N)
C Programs Are Asked in This Section: Ans. O (N)
1. Write a program to insert a node in a sorted linked list. 2. Write a program to implement the Fibinocci series. 3. Write a program to concatenate two circular linked lists into a single circular list. 5. Write a program to reverse a linked list.(see three methods in my copy). 9. What is the worst case complexity of Quick sort? Ans. O(n2) Write the programs for the following problems in C. 1. Swap two variables x,y : 1).without using a temporary variable. 2)with the use of XOR, 3)With arithmetic operators +and *. 2. Write algorithm for finding the GCD of a number. (all good)
4. The integers from 1 to n are stored in an array in a random fashion. but one integer is missing. Write a program to find the missing integer. Ans). Hint : The sum of n natural numbers is = n(n+1)/2. if we subtract the above sum from the sum of all the numbers in the array , the result is nothing but the missing number. 9. Write a C program to find whether a stack is progressing in forward or reverse direction. i.e big endian or little endian
11. If a set of numbers are in sorted order then which of the following sorting method is best Ans. Bubble Sort