Crowdly
Додати до Chrome
Questions Bank (1270364 total)
___ is the maximum amount of time an algorithm takes to execute a specific set of inputs.
Worst case time complexity
✅
Average case time complexity
❌
Best case time complexity
❌
Running time
❌
Переглянути це питання
If for a problem an optimal solution can be created by constructing optimal solutions for its subproblems, the problem possesses ____________ .
Optimal substructure property
✅
Greedy
❌
Overlapping subproblems
❌
Memoization
❌
Переглянути це питання
In flow networks Residual capacity Cf(u,v) is given by
f(u, v) – c(u,v)
0%
s(u,v) – t(u,v)
0%
c(u,v) – f(u,v)
0%
t(u,v) – s(u,v)
0%
Переглянути це питання
Which of the following is a primary advantage of the Knuth-Morris-Pratt (KMP) algorithm over the naive string matching algorithm?
KMP algorithm avoids recomputing the pattern matching comparisons by using a precomputed table.
0%
KMP is faster in the worst case.
0%
KMP can handle both case-sensitive and case-insensitive matches.
0%
KMP performs better in practice for large inputs.
0%
Переглянути це питання
In what manner is a state-space tree for a backtracking algorithm constructed?
Nearest neighbour first
0%
Twice around the tree
0%
Depth-first search
0%
Breadth-first search
0%
Переглянути це питання
The type of encoding where no character code is the prefix of another character code is called?
trie encoding
0%
prefix encoding
0%
frequency encoding
0%
optimal encoding
0%
Переглянути це питання
Time complexity of LCS
O(m!)
❌
O(n!)
❌
O(m/n)
❌
O(mn)
✅
Переглянути це питання
We use ___ for finding solutions to sub-problems, so as to reduce recalculation.
Recursion
0%
Backtracking
0%
Branch and bound algorithms
0%
Memoization
0%
Переглянути це питання
Solve the recurrence relation: T(n)= T(n/2)+O(1)
O(n)
❌
O(1)
❌
O(log n)
✅
O(n log n)
❌
Переглянути це питання
Which of the following statements about loop invariants is false?
A loop invariant is the opposite, that is the negation, of the condition of the loop.
0%
To prove that a statement is a loop invariant, we use mathematical induction.
0%
Loop invariants are used to show that algorithms produce the correct results.
0%
Loop invariants remain true each time a loop is executed.
0%
Переглянути це питання
Попередня
1
Більше сторінок
115525
115526
115527
115528
115529
Більше сторінок
127037
Наступна
Telegram
Instagram
TikTok
Question Bank
Умови використання
Зв'яжіться з нами
Додати до Chrome