Anda di halaman 1dari 2

[Megasoft IT Solution] Array: Question Sets from Dec-2007 to Jan-2001: -

1. Assume A is an N x N square matrix. Write the algorithm for the following operations in the matrix A. [Dec-2007] Find the product of the diagonal elements of A. Find the sum of all the elements below the diagonal elements.

2. Write an application program in C language to accept a string from keyboard, check and display the message whether it is a palindrome or not. [Dec-2007] 3. Write an algorithm to subtract two polynomials using array implementation. Assume polynomials have M and N terms. [June-2007] 4. Write an algorithm to store the sparse array using linked list. [June-2007]

5. A two dimensional matrix is represented using a row major order. Write the formula and calculate the address of element A [10] [5]. Assume the dimensions as A [10] [10]. [June-2007] 6. Write an algorithm for converting an Adjacency list to an adjacency matrix in C language. [June-2007] 7. Write a program in C language to accept a paragraph of text as input. Make a list of words and number of occurrences of each word in a program as an output. [Dec-2006] 8. Write a C program to test if a string entered from keyboard is a palindrome, that is it reads the same backwards and forwards e.g. Able was I ere I saw Elba. [Dec-2006] 9. Write an algorithm for multiplication or two matrices. [Dec-2005]

10. Develop algorithms to add two polynomials in one variable. You must choose polynomials containing a minimum of four terms. [Dec-2005] 11. Write an algorithm to compute the transpose of a sparse matrix. [June-2005]

12. Write a program in C language that accepts a string as input and checks whether the string is a palindrome or not. [June-2005] 13. A sparse matrix is represented using an array that stores the row numbers, column number and value triple for all non-zero elements in a sorted sequence of row number and column number. Design the suitable array structure using C to represent the above. Write an algorithm to transpose the matrix so represented. [Dec-2004]

AKumar@ANHR

[Megasoft IT Solution]

14. A two dimensional matrix is represented using a column major order. Write the formula for calculating the location of element A [m] [n]. [Dec-2004] 15. How are sparse matrices represented using arrays? Write an algorithm to multiply two such sparse matrices. Derive the time complexity of this algorithm. [June-2004] 16. The integer array defined as I [100] [100] starts from memory location 90. At which memory location is the element I [20] [5] located if storage is done in column major order. Make necessary assumptions about integer size. [June-2004] 17. Write an algorithm to search for a substring within a string. What is the time complexity of your algorithm? [June-2004] 18. Write an algorithm to add two polynomials. Use the array implementation. If the polynomials have M and N terms respectively. What is the time complexity of your algorithm? [Dec-2003] 19. Write an algorithm for the multiplication of two sparse matrices (Use proper representation for the sparse matrices). [Dec-2003] 20. Write a function to multiply two polynomials using linked list implementation. You must make sure that the output polynomial is sorted by exponent and has almost one term corresponding to any power. Assume appropriate representation to representation for input polynomial. [June-2003] 21. Given two sorted list, L1 and L2, write an algorithm to compute L1 L2. L1 and L2 are to be implemented as arrays. [June-2003] 22. Write an algorithm for the addition of two matrices. The second matrix will be a sparse matrix. The first matrix is not a sparse matrix. [June-2003] 23. Write an algorithm for multiplication of two matrices. [Dec-2002]

24. If A = (a1, a2, .. an) and B = (b1, b2, ...bm) are ordered lists and are represented by arrays, then write an algorithm for the concatenation of the above ordered lists. [June-2002] 25. Write an algorithm for generating the transpose of given sparse matrix? [Dec-2001] 26. Write a function in C language to determine if a word or phrase is a palindrome or not? [Jan-2001]

AKumar@ANHR

Anda mungkin juga menyukai