Recent questions tagged algorithms

2 votes
1 answer
1981
If F(n) = (log n)n then, is F(n) = O(n2) true?Also, what about F(n) = $\Theta$(n2)
0 votes
1 answer
1982
1 votes
0 answers
1983
3 votes
0 answers
1985
1 votes
2 answers
1987
g(n)=Ώ(n)h(n)=O(n)g(n) . h(n) =?
3 votes
3 answers
1988
"Quick sort has good cache performance" , Can anyone explain this statement.How is cache related to quick sort.I searched for this over the internet but could not find a ...
1 votes
1 answer
1989
The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.I think in line graph has the...
1 votes
2 answers
1990
0 votes
0 answers
1991
1 votes
3 answers
1992
The innermost loop will execute when j is multiple of i, and that will happen exactly i times. Please help me to find the time complexity of the below program:
0 votes
1 answer
1993
Consider the following recurrence.T(n) = T() + What is the value of recurrence?please explain in detail
0 votes
1 answer
1994
7 votes
3 answers
1997
Which of the following is exact recurrence relation for binary search (in terms of number of comparisons) ?1. T(n) = 2T(n/2) + 12. T(n) = 2T(n/2) + 2Please specify releva...
3 votes
3 answers
1998
suppose there are 4 sorted lists of n/4 elements each. if we merge these list into a single sorted list of n elements, for the n=400 number of key comparisons in the wors...
0 votes
3 answers
1999
0 votes
1 answer
2000
If a directed graph G is cyclic but can be made acyclic by removing 1 edge then a DFS will encounter exactly 1 Backedge. True or false ?
1 votes
1 answer
2001
0 votes
1 answer
2002
What is the time complexity to construct a binary tree when inorder and preorder traversal of the tree is given?1. O(n)2.O(n log n)3. O(n2)4.O(n2 log n)
3 votes
1 answer
2004
2 votes
2 answers
2005
2 votes
1 answer
2006
0 votes
0 answers
2007
2 votes
1 answer
2009
explain complexity for this
1 votes
1 answer
2010
is the time complexity for this fuction is O(n)?