Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 71238

The amount of time resources (number of atomic operations or machine steps) required to solve a problem expressed in terms of input size. If your question concerns algorithm analysis, use the [runtime-analysis] tag instead. If your question concerns whether or not a computation will *ever* finish, use the [computability] tag instead. Time-complexity is perhaps the most important sub-topic of complexity theory.

0 votes

Help with model answer for time complexity

The loop body will be executed $n - 1$ times because your index variable is initially set to $2$ rather than $1$. Hence, at the start of the loop body, the values for index are from the range $\{2, 3, …
Watercrystal's user avatar
  • 1,536
1 vote

Given a list of vertices in a binary tree output minimal sublist with the same lowest common...

Consider your binary tree as a binary search tree on the integers $1$ through $n$ to find that the answer for some given list $L \subseteq [1, n]$ will be $\{\min L, \max L\}$. In case you are not giv …
Watercrystal's user avatar
  • 1,536
0 votes

How to encode a Universal Turing machine to an Integer $\in\mathbb{N}^+$?

There are many ways to encode Turing machines. Essentially, this is possible because a TM $M$ is specified by a finite amount of information just like a computer program is completely specified by its …
Watercrystal's user avatar
  • 1,536