Skip to content

JassWeb

  • Home
  • Solved
    • javascript
    • c++
    • java
    • git
    • php
    • arrays
    • html
    • python
    • jquery
    • mysql
    • .net
    • json
    • ajax

big-o

[Solved] big O time complexity recurrence relation [closed]

September 23, 2022 by Kirat

For positive ? the number of executions of count = count + 1 is representative of the complexity, as the other lines of code don’t execute significantly more times. The recurrence relation can use the first iteration of the outer loop: that represents ? iterations of the inner loop. The loop continues for ?/2, and … Read more

Categories Solved Tags algorithm, big-o, time-complexity

[Solved] What is the value of performance in an application, in dollar form? [closed]

September 20, 2022 by Kirat

Distributed Computing Economics written by Jim Gray in 2003 is a good start. See this quote: From this we conclude that one dollar equates to = 1 $ ≈ 1 GB sent over the WAN ≈ 10 Tops (tera cpu operations) ≈ 8 hours of cpu time ≈ 1 GB disk space ≈ 10 M … Read more

Categories Solved Tags big-o, memory, performance

[Solved] Why efficiency of selection sort or Bubble or Insertion sort is said to be n^2 and not as n(n-1)/2

September 19, 2022 by Kirat

In big-O notation only the most significant term counts, and constant coefficients are ignored: O[n(n-1)/2] = O[n²/2 + n/2] = O[n²/2] = O(n²) 2 solved Why efficiency of selection sort or Bubble or Insertion sort is said to be n^2 and not as n(n-1)/2

Categories Solved Tags algorithm, big-o, performance, sorting

[Solved] what is the best-case / worst-case analysis for the following loop? [closed]

September 7, 2022 by Kirat

There will be exactly n iterations of the first loop. There will be exactly n(n+1)/2 iterations of the second loop. Inside of the second loop there is roughly 1/3 of n/2 long loops, 1/3 of j long loops and 1/3 of 2 long loops. If we look only at the first of the three possible … Read more

Categories Solved Tags algorithm, analysis, big-o, c++, complexity-theory

[Solved] How do I prove or disprove that this function is Ω(n^1.5)?

August 26, 2022 by Kirat

Assuming that T(n) doesn’t suddenly become negative at some value of n, we can give a lower bound for the left hand side if we neglect the first term: We define a new function S(n) such that: We can immediately see that it has terms (ignoring off-by-one etc.). Thus if we keep expanding: At this … Read more

Categories Solved Tags big-o, data-structures, time-complexity

[Solved] Figuring out the complexity of the code

August 22, 2022 by Kirat

f(N) is the sum of all integers which are less or equals to N. f(N) = N + f(N-1) = N + N-1 + N-2 + … + 2 + 1 = N*(N+1) / 2 0 solved Figuring out the complexity of the code

Categories Solved Tags algorithm, big-o, complexity-theory

[Solved] How to calculate Big-O? [closed]

August 21, 2022 by Kirat

For the first method, it is n*n = n^2. Since there are two loops, for each loop O(n) is n since you are going through each item in an array. Second one is a constant o(1). 1 solved How to calculate Big-O? [closed]

Categories Solved Tags algorithm, big-o, java
Newer posts
← Previous Page1 Page2

Recent Posts

  • [Solved] Check to see if two lists have the same value at the same index, if so return the index. If not return -1
  • [Solved] Generics C# organization of methods that depends on type [closed]
  • [Solved] Database – SQL Table to Perl Script
  • [Solved] Comment xml elements programmatically
  • [Solved] Logging printout of an executed python file within another file and printing out the result in terminal simultaneously

Archives

  • November 2023
  • June 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • November 2021
  • August 2020
  • March 2020
  • June 2019
  • February 2019
  • September 2018
  • August 2018
  • July 2018
  • March 2018
  • February 2018
  • December 2017
  • October 2017
  • August 2017
  • January 2017
  • September 2016
  • May 2016
  • January 2016
  • October 2015
  • July 2015
  • February 2015
  • December 2014
  • November 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • March 2014
  • January 2014
  • January 2013
  • October 2012
  • March 2012
  • October 2011
  • March 2011
  • January 2010
  • September 2009
  • May 2009
  • February 2009
  • January 2009
  • October 2007
  • January 2007
  • November 2004
  • May 2002
  • September 2001
  • May 2001

Categories

  • Solved
  • WordPress

Quick Links

© 2025 JassWeb • Built with GeneratePress