Search results for algorithms

4 votes
4 answers
2
Two main measures for the efficiency of an algorithm are:Processor and MemoryComplexity and CapacityTime and SpaceData and Space
89 votes
16 answers
3
35 votes
6 answers
4
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of$O(m)$$O(n)$$O(m+n)$$O(\log m + \log n)$
19 votes
8 answers
5
44 votes
4 answers
6
31 votes
6 answers
7
The Breadth First Search algorithm has been implemented using the queue data structure. One possible order of visiting the nodes of the following graph is:$\text{MNOPQR}$...
113 votes
9 answers
8
The number of elements that can be sorted in $\Theta(\log n)$ time using heap sort is$\Theta(1)$$\Theta(\sqrt{\log} n)$$\Theta(\frac{\log n}{\log \log n})$$\Theta(\log n)...
79 votes
7 answers
9
The minimum number of comparisons required to determine if an integer appears more than $\frac{n}{2}$ times in a sorted array of $n$ integers is$\Theta(n)$$\Theta(\log n)...
77 votes
5 answers
10
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of$n$$n^2$$n \log n$$n \log^2n$
85 votes
18 answers
11
72 votes
14 answers
13
A list of $n$ strings, each of length $n$, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is$O (n \log...
64 votes
15 answers
14
61 votes
10 answers
15
59 votes
7 answers
16
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:QueueStackHeapB-Tree
56 votes
8 answers
18
The average number of key comparisons required for a successful search for sequential search on $n$ items is$\frac{n}{2}$$\frac{n-1}{2}$$\frac{n+1}{2}$None of the above
63 votes
11 answers
19
42 votes
5 answers
20