The selection sort is basically a method of repeated
1. interchange
2.searching
3.position adjustment
4.None of These
Posted Date:-2022-07-06 12:26:37
A sorted file contains 16 items. Using binary search, the maximum number of comparisons to search for an item in this file is
1.15
2.8
3.1
4.4
Posted Date:-2022-07-06 09:18:19
A sorting technique that guarantees that records with the same primary key occurs in the same order in the sorted list as in the original unsorted list is said to be
1.. stable
2.consistent
3.external
4.linear
Posted Date:-2022-07-06 09:20:58
A ______ merge sort uses a constant number of input merge files and the same number of output merge files.
1.k-way
2.balanced
3.polyphase
4.radix
Posted Date:-2022-07-06 08:33:52
Best and the worst case timing complexities of insertion sort are_________.
1. A. o(n2), o(n2)
2.o(n log n), o(n2)
3.o(n), o(n2)
4.o(n), o(n3)
Posted Date:-2022-07-06 08:48:18
Give output of the following programint main(){inta[]={2,3,4,5,6};printf("%d",2[a]);}
1. compilation error
2.run time error
3.4
4.2
Posted Date:-2022-07-06 09:12:09
Give timing complexities of three sorting algorithms bubble sort,selection sort,insertion sort respectively.
1.0(log n), 0(log n), o(log n)
2.o(n2), o(n2), o(n2)
3.o(n2), o(n log n), o(n log n)
4.o(n log n), o(n2), o(n log n)
Posted Date:-2022-07-06 08:46:44
If two different keys yield the same hash address, it is called _______ .
1.binary search
2.sequential search
3.collision
4.rotation
Posted Date:-2022-07-06 08:28:06
In bubble sort,for a file of size n,after p iterations number of records in proper position is____
1. n-p
2. n-p+1
3. n-p+2
4.p
Posted Date:-2022-07-06 12:20:42
let x be the adjacency matrix of a graph .G with no self loop.The entries along the principle diagonal of x are
1. all "0"
2.all "1"
3.both 0&1
4.different
Posted Date:-2022-07-06 08:07:25
The number of comparisons required to sort 5 numbers in ascending order using bubble sort are
1.7
2.6
3.10
4.5
Posted Date:-2022-07-06 09:15:18
The smallest element of an array’s index is called its
1.lower bound
2.upper bound
3.range
4.extraction
Posted Date:-2022-07-06 09:28:32
Where do we use the operator --> ?
1. to access a member of structure
2.to access member of union
3.to access an array
4.both(a) and(b).
Posted Date:-2022-07-06 09:13:00
Which of the following data structure can't store the non-homogeneous data element?
1.arrays
2.records
3.pointers
4.none
Posted Date:-2022-07-06 09:08:45
Which of the following sorting method is the slowest?
1.o(1)
2.o(log2n)
3.o(n)
4. o(n2)
Posted Date:-2022-07-06 12:19:25
. A sort which compares adjacent elements in a list and switches wherever necessary is _______
1. insertion sort
2.bubble sort
3.selection sort
4. none of these
Posted Date:-2022-07-06 09:32:22
a character when enter is pressed
1.0 or 1
2.-1, 0 or 1
3.a character
4.nothing
Posted Date:-2022-07-06 08:53:54
A sort which compares adjacent elements in a list and switches where necessary is
1. insertion sort.
2.heap sort
3.quick sort
4.bubble sort
Posted Date:-2022-07-06 09:19:06
A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
1. insertion sort
2.selection sort
3.heap sort
4. quick sort
Posted Date:-2022-07-06 09:19:49
A sorting algorithm is stable if
1. its time complexity is constant irrespective of the nature of input
2. preserves the original order of records with equal keys
3.its space complexity is constant irrespective of the nature of input
4. it sorts any volume of data in a constant time
Posted Date:-2022-07-06 09:16:25
A variable P is called pointer if__ A.
1.p contains the address of an element in data
2.p points to the address of first element in data
3.p can store only memory address
4.p contain the data and the address of data
Posted Date:-2022-07-06 09:08:05
A ______ is a data structure use foe a storage of a records.
1.tree
2. hash table
3.stack
4.graph
Posted Date:-2022-07-06 08:11:45
By using which of the following methods sorting is not possible?
1. insertion
2.exchange
3.selection
4.deletion
Posted Date:-2022-07-06 08:10:14
Examples of sorting algorithms are
1. bubble sort
2.selection sort
3.insertion sort
4.(a),(b),and ©
Posted Date:-2022-07-06 08:45:38
Given a file size n the number of times a given file is passed through in bubble sort is____
1.n2
2.n-1
3.nlogn
4.logn
Posted Date:-2022-07-06 12:23:04
how many vlue can held by an array A(-1…m,1…m)?
1. m
2.m^2
3.m(m+1)
4.m(m+2)
Posted Date:-2022-07-06 08:06:35
If s1 is "ABC" and s2 is "DEF" then strcat(s1,s2)will give the following result.
1. s1="abcdef" and s2="def"
2. s1="abcdef" and s2="def"
3.s1="abc" and s2="abcdef"
4.s1="abc" and s2="abcdef"
Posted Date:-2022-07-06 09:11:08
If the input array is unsorted, then only a linear ______ can be used.
1.binary search
2.sequential search
3.indexed search
4.jump search
Posted Date:-2022-07-06 08:13:43
In bubble sort,for a file of size n,during each pth pass the number of last records left out are___
1. n-p
2.n-p+1
3.p
4.p-1
Posted Date:-2022-07-06 12:22:06
In ______ method of hashing, selected digit are extracted from the key and used as the address.
1. subtraction
2.digit extraction
3.rotation
4.folding
Posted Date:-2022-07-06 08:15:09
One of the statement is false
1. A. tree is an abstract data type
2.array is a linear data structure
3. typedef is derived data type
4.float is built in data type
Posted Date:-2022-07-06 08:44:49
Sorting is useful for_________
1.report genration
2.minimizing the storage needed
3.making searching easier and efficient
4.responding to queries easily
Posted Date:-2022-07-06 08:51:38
The average case complexity of Insertion Sort is
1.o(2n)
2. o(n3)
3. o(n2)
4.o(2n)
Posted Date:-2022-07-06 09:17:43
The difference between linear array and a record is_____
1. an array is suitable for homogeneous data but the data items in a record may have different data type
2.. in a record,theremay not be a natural ordering in opposed ti linear array
3.a record form a hierarchical structure but a linear array does not
4.All of the above
Posted Date:-2022-07-06 09:09:48
The function strcmp(s1,s2)will return -1 if____
1.s1>s2
2. s1=s2
3. s1<s2
4.function does not return -1.
Posted Date:-2022-07-06 09:13:57
The getch() library function returns___
1.a character when any key is pressed
2.a character when enter is pressed
3.displays a character on the screen when any key is pressed
4.None of these
Posted Date:-2022-07-06 08:52:27
The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is
1.6
2.5
3.7
4.8
Posted Date:-2022-07-06 09:26:52
The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order, using bubble sort is
1.11
2.12
3.13
4.14
Posted Date:-2022-07-06 09:20:11
The ______ sort algorithm is called diminishing increment sort.
1.merge
2.radix
3.shell
4.selection
Posted Date:-2022-07-06 08:33:11
Total number of comparision in bubble sort is____
1.o(nlogn)
2.o(n2)
3. o(n)
4.None of These
Posted Date:-2022-07-06 12:24:36
What is the number of swaps required to sort n elements using selection sort, in the worst case?
1. Θ(n)
2.Θ(n log n)
3.Θ(n2)
4.Θ(n2 log n)
Posted Date:-2022-07-06 09:25:54
Which is the simplest file structure?
1. sequential
2.indexed
3.random
4.bubble
Posted Date:-2022-07-06 08:11:04
Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficienty?
1. bubble sort B. C. D. merge sort
2.selection sort
3.insertion sort
4.insertion sort
Posted Date:-2022-07-06 09:23:39
Which of the following sorting methods would be most suitable for sorting a list which is almost sorted
1.bubble sort
2.selection sort
3. insertion sort
4.merge sort
Posted Date:-2022-07-06 09:30:13
Which sorting algorithm can exploit the partially sorted data in a list?
1.bubble sort
2.selection sort
3.insertion sort
4.all of them
Posted Date:-2022-07-06 08:50:37
You are asked to sort 15 randomly generated numbers. You should prefer
1. bubble sort
2.selection sort
3.insertion sort
4.merge sort
Posted Date:-2022-07-06 09:24:19
You want to check whether a given set of items is sorted. Which of the following sorting methods will be most efficient if it is already in sorted order?
1. bubble sort
2.selection sort
3.insertion sort
4.merge sort
Posted Date:-2022-07-06 09:22:30
__ refers to the operation of finding the location of a given item in a collection of items.
1.sorting
2.searching
3.function
4.complexity
Posted Date:-2022-07-06 08:08:33
__passes are required to sort n data using bubble sort.
1.n
2.n-1
3.n+2
4. n-2
Posted Date:-2022-07-06 08:47:29
___ method of collision resolution involves maintaining two tables in memory.
1.linear probing
2.chaining
3.quadratic probing
4.double hashing
Posted Date:-2022-07-06 08:34:35
____ is a attribute of a sort, indicating that data with equal keys maintain their relative input order in the output.
1. sort order
2.sort stability
3.sort efficiency
4.collision
Posted Date:-2022-07-06 08:14:25
____ is a merge sort that sorts a data stream using repeated merges.
1. balanced
2.polyphase
3.radix
4.k-way
Posted Date:-2022-07-06 08:43:13
_____ hashing method is used in combination with other methods.
1.subtraction
2.digit extraction
3.rotation
4.division
Posted Date:-2022-07-06 08:25:39
_____ is a search for data that uses an index to locate the item.
1. binary search
2.sequential search
3.indexed search
4.jump search
Posted Date:-2022-07-06 08:13:11
______ is a field whose values uniquely determine the records in the file.
1. pointer
2.primary key
3.secondary key
4.function
Posted Date:-2022-07-06 08:09:34