0% found this document useful (0 votes)
22 views1 page

DS MTE Practice Set

Uploaded by

rkrehankhan00786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

DS MTE Practice Set

Uploaded by

rkrehankhan00786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Q.N.

Question
Arrange all the given time complexities in ascending order. O(n), O(n^2),
1 O(n!), O(log n), O(3^n), O(n log n), O(10), O(n^4)
Consider the linear arrays A[ 3:24], B[-3:12]. Find the number of elements in
2 each array.
Suppose an array, B[-5 ..... +4 ] having Base address (BA) = 100 and size of an
3 element = 4 bytes, find the location of B[-2].
Apply the binary search on the given numbers to find location of 25 (Show
4 all steps). Given Array: 2,4,7,12,14,17,23,25,35,41,47
Sort the given numbers using bubble sort(show all steps). Given Array:
5 15,32,27,31,8,11
Show all the steps of Tower of Hanoi to move 4 disks from source peg to
6 destination peg.
7 Write a java program for inserting an element in given loacation in array.
8 Write a java program to find sum of digits of an integer using tail recursion.
Write a Java program to replace a specific element with an other element in
9 array each time.
Consider the multi-dimensional array A (2:18, 10:15, -5:5). Suppose Base
(A)=200 with word size = 2. Find the effective indices E1, E2 & E3 and
10 address of A[5, 12,3] using column-major order.
Write a Java program to print elements which are appeared single time in
11 array of integers.
Write a program in Java to find the smallest element in array using
12 recursion.
13 Write a java program to reverse a string using recursion.
Write a pseudocode or Java program to find all pairs of elements in an array
14 whose product is equal to a specified number.
Write a Java program to find non common elements in two sorted (in non-
15 decreasing order) arrays.
Write a program to move all the duplicate values of the given numbers at
16 the start of the array.
17 Solve a Tower of Hanoi problem for n disks and 4 towers.
18 Drive the formula for address calculation of 3-D array in row major order.
Write a program in Java to find sum of odd elements of even rows and even
19 elements of odd rows.
Write a Java program to print first row from left to right then last column
from top to bottom then last row from right to left then first column from
20 bottom to top in NxN matrix.

You might also like