2 Replies - 497 Views - Last Post: 13 September 2011 - 09:00 AM Rate Topic: -----

#1 lledo3   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 28-February 11

Seeking Help with Big-O Notation and Time Complexity!

Posted 13 September 2011 - 08:54 AM

public static int problem1(int n){ 
              return 3;
}


I am having a questions regarding Big-O notation. I just want to make sure I am right. This is constant, O(1)?!? Now I am not sure about the worst, average, best case. Could someone explain to me the time complexity for this problem.
Is This A Good Question/Topic? 0
  • +

Replies To: Seeking Help with Big-O Notation and Time Complexity!

#2 x68zeppelin80x   User is offline

  • D.I.C Addict

Reputation: 130
  • View blog
  • Posts: 576
  • Joined: 07-March 09

Re: Seeking Help with Big-O Notation and Time Complexity!

Posted 13 September 2011 - 08:56 AM

Check this out.
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12560
  • View blog
  • Posts: 45,686
  • Joined: 27-December 08

Re: Seeking Help with Big-O Notation and Time Complexity!

Posted 13 September 2011 - 09:00 AM

Please don't open duplicate threads.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1