Skip to main content

Questions tagged [big-o-notation]

Big O Notation is an informal name of the "O(x)" notation used to describe asymptotic behaviour of functions. It is a special case of Landau notation, where the O is the Greek letter capital omicron. Please consider using the [landau-notation] tag instead if your question is related to small omicron, omega, or theta in Landau notation.

1 vote
1 answer
66 views

So I understand that O is an upper bound and omega is a lower bound. I also understand that case is different than bounds, i.e worst case can have O/Theta/Omega different from best case. My question: ...
user1497350's user avatar
0 votes
0 answers
52 views

There is the following algorithm: ...
Tony Oliveira's user avatar
2 votes
1 answer
76 views

How does one go about proving that the lowest possible time complexity for traversing an array is $O(n)$?, it is easy to see that this is the case. But how could I formally prove that this is true?, ...
Ignaciof's user avatar
1 vote
1 answer
117 views

Here's the problem: you get an array of numbers. lets say you get an array of 5 numbers: {5,3,4,1,1}. Each of the numbers in the array represent a 'tower'. Your goal is to make the array in the shape ...
monish kumar's user avatar
-1 votes
1 answer
69 views

LeetCode Problem 347. Top K Frequent Elements asks the user to return a list of the $k$ most frequently occurring numbers from a list of numbers. The following solution uses bucket sort: ...
user1446642's user avatar
0 votes
1 answer
94 views

I am reading Computer Science Distilled book and in section 2.2 The Big-O Notation there is a line. A function with fastest-growing term of $2^n$ or weaker is $O(2^n)$ What does weaker mean here? ...
tbhaxor's user avatar
  • 208
2 votes
4 answers
316 views

I haven't seen any estimation with big O of tangent, I tried to use limit for the proof, however for it's oscillating behaviour I find it hard to prove that $tan(x)\neq O(2^x)$ where x is all real ...
math boy's user avatar
  • 394
1 vote
2 answers
128 views

$$ T(n) = \begin{cases} 4T(\frac n 2) + \Theta(n) & n \gt 1\\ 1 & n \le 1 \end{cases} $$ I have to calculate the complexity of an algorithm taking time according to above equations using ...
pepper's user avatar
  • 11
2 votes
0 answers
73 views

I've been scouring around looking for a definition for Big-O when you have multiple input variables. For context, I'm an undergraduate student. Wikipedia mentions $$f(\mathbf{x})\text{ is }O(g(\mathbf{...
proof-of-correctness's user avatar
0 votes
1 answer
79 views

The following is a Leetcode problem: 473. Matchsticks to Square (https://leetcode.com/problems/matchsticks-to-square/description/) Problem Statement You have an array, matchsticks, of size n, with ...
monre's user avatar
  • 1
0 votes
0 answers
97 views

I'm trying to devise an algorithm for the following prompt from LeetCode's daily challenge: You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[...
Abhay Agarwal's user avatar
0 votes
1 answer
54 views

I have initial condition $๐‘›_1=2, ๐‘ฃ_1=1$, and the given recurrence relations: $๐‘›_{๐‘–+1}=2๐‘›_๐‘–,$ $๐‘ฃ_{๐‘–+1}=2๐‘ฃ_๐‘–+\frac{1}{2} ๐‘›_๐‘–$ I need to show that that, $v_i=\Theta(n_i\logโก n_i).$ I observe ...
user avatar
2 votes
3 answers
221 views

I have a problem with this time complexity: $\log (n!)+\frac{5}{2}n\log\log n$. I'm not sure how to deal with the $n!$ term. I know from calculus class that the sequence $n!$ is bigger than any ...
Crash's user avatar
  • 31
0 votes
1 answer
88 views

I have for every constant $c$ (no matter how large) and for every $\epsilon >0$(no matter how small), how can I show that $$n.e^{\sqrt{\log n}}=\omega(n\log^c n)\\ n.e^{\sqrt{\log n}}=o(n^{1+\...
user avatar
1 vote
1 answer
83 views

To show $n\log n + n \log(\log n) = \Theta(\log n)$. Is this even correct? It can be easily shown that, $n \log n + n \log(\log n)$ is $O(n\log n)$ and also $\Omega(n\log n)$, with constants $2$ and $...
Sandipan Majhi's user avatar

15 30 50 per page
1
2 3 4 5
โ€ฆ
26