New answers tagged

0 votes

Maximum of a tritonic array

You can't. It's not possible to do this in $O(\log n)$ time. Consider the following two possibilities for the tritonic array: We have an array $A^1$ that contains the values $1,2,3,4,\dots,n$, ...
D.W.'s user avatar
  • 158k
0 votes

Correctness proof of bubble sort(bogus proof)

BubbleSort can be expressed in a few different ways, I'm assuming you're referring to something similar to wikipedias formulation. The mistake in your proof is that you assume that sorting an $n + 1$ ...
Knogger's user avatar
  • 665
2 votes

Prove the relation between space complexity and time complexity of the graph search which uses "the explored set"

The usage of "within" is a bit confusing, but I think it means the space complexity is never smaller than the time complexity divided by a factor of $b$. The space complexity of an algorithm ...
Discrete lizard's user avatar
  • 8,128

Top 50 recent answers are included