Implementing Binary Search Tree term Counter

Implementing term count in Binary Search trees

Page 1 of 1

0 Replies - 1427 Views - Last Post: 05 November 2008 - 08:58 AM Rate Topic: -----

#1 Learner_Net   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-November 08

Implementing Binary Search Tree term Counter

Post icon  Posted 05 November 2008 - 08:58 AM

Hi Experts!

I am currently working on a Binary search tree Class which I need for counting the number of times each term in a bunch of lines appear.

I have set up the structure, and I want it to be outlined as follows
Public Interface Term_Count

		' Starts the iteration through the terms.
		Sub StartIteration()

		' Returns true if there are more terms.
		Function HasMore() As Boolean

		' Returns the next TermCount pair.
		Function GetNext() As TermCount

		' Increments the count of the given term.
		' If the term does not yet exist in the TermCounter,
		' the count is set to 1 for the term.
		Sub IncrementCount(ByVal term As String)

End Interface

Can you please guide me as to how I should implement this algorithm in a time efficient manner?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1