1 Replies - 459 Views - Last Post: 06 December 2017 - 02:17 PM

#1 chloeCodes   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 227
  • Joined: 05-January 17

RunTime Results of Binary Search Tree algorithm

Posted 06 December 2017 - 01:59 PM

Hi!

I have implemented a Binary Search Tree data structure, and I want to graph the run time results I obtained from testing the add method (Adding words to the tree), so tending the runtime of adding a word to different collection sizes.

-Initially I was plotting n(number of elements in collection) against RunTime
-Then after doing research, I realized I had to plot (Log(n)) against RunTime (Hope that's correct!)
-I want to show that the results obtained match the O(Log n) time complexity
The graph I obtained is attached!

Does that match/resemble time complexity for O(Log n). I would greatly appreciate any advice.

Thanks!

This post has been edited by chloeCodes: 06 December 2017 - 02:01 PM


Is This A Good Question/Topic? 0
  • +

Replies To: RunTime Results of Binary Search Tree algorithm

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15262
  • View blog
  • Posts: 61,181
  • Joined: 12-June 08

Re: RunTime Results of Binary Search Tree algorithm

Posted 06 December 2017 - 02:17 PM

Please do not create duplicate topics. Closing.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1