The Big-O notation is used to represent asymptotic upper bounds.
It seems to be common knowledge that hash tables can achieve O(1), but that has never made sense to me. …
algorithm performance language-agnostic big-o hashtableToday in class my teacher wrote on the blackboard this recursive factorial algorithm: int factorial(int n) { if (n == 1) return 1; …
complexity-theory big-o factorialWhile trying to understand the difference between Theta and O notation I came across the following statement : The Theta-notation asymptotically …
algorithm big-o big-thetaI can see how, when looking up a value in a BST we leave half the tree everytime we compare …
data-structures time-complexity big-o binary-search-treeFirst, here's my Shell sort code (using Java): public char[] shellSort(char[] chars) { int n = chars.length; int increment = n / 2; …
algorithm big-o time-complexity shellsortI'm referring to this: http://docs.python.org/tutorial/datastructures.html What would be the running time of list.index(…
python algorithm list big-o performanceIs there an algorithm that, given two sets, computes their intersection in linear time? I can run two for loops …
algorithm math data-structures big-o set-intersectionProve that 1 + 1/2 + 1/3 + ... + 1/n is O(log n). Assume n = 2^k I put the series into the summation, but I have …
time-complexity big-o complexity-theoryfor (int front = 1; front < intArray.length; front++) { for (int i = 0; i < intArray.length - front; i++) { if (intArray[…
algorithm sorting complexity-theory big-o bubble-sort