User Profile

Collapse

Profile Sidebar

Collapse
kwstriker299
kwstriker299
Last Activity: Oct 25 '08, 06:43 PM
Joined: Sep 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Yes I know how to make all of the necessary rotations on paper like you suggested. But lets say we wanted to implent it. How would we do that?

    Would this work?

    Code:
    Insert item
    Check height to see if the tree is balanced
    If it is unbalanced, call function to perform necessary swaps
    The only thing that I am unclear about would be how to know which type of rotation is to be used? How would you...
    See more | Go to post

    Leave a comment:


  • yes i understand what you are saying, and that was the question that my professor posed to us.

    How would you change the tree building process so that the tree is nearly balnaced?

    The one thought that I am having is rotating the nodes after they are inserted, more like an AVL tree would do.

    Does any one know of any pseudo-code to implement a rotation? After thinking about it more I think rotation would...
    See more | Go to post

    Leave a comment:


  • I'm not real sure what you are getting at.....wouldn't the height of each subtree already be 1, since every parent node would have 1 child node on the right side?...
    See more | Go to post

    Leave a comment:


  • Insert items into a Binary Search Tree in ascending order

    Today in class, my professor posed an interesting question for us to think about before our next class. If you insert items that are in ascending order into a binary search tree, then you will build the worst possible tree since it will have the largest possible height. The question is:

    How would you change the tree building process so that the tree is nearly balanced ?

    Just something to think about, if anyone has...
    See more | Go to post

  • kwstriker299
    replied to Loop through all records in a table
    Another question,

    If i use the DCount() methode like this:

    DCount("[Folder_Num]", "tbl_Scan_Index ", "[Folder_Num] = 1")

    It works fine, and returns the correct result. Is there any way that it can be used with a variable (folder) instead of hard coding [Folder_Num] = 1. I would like to be able to increment the folder.

    Thanks in advance!!!
    See more | Go to post

    Leave a comment:


  • kwstriker299
    replied to Loop through all records in a table
    Thanks guys!!!

    Your suggestions worked wonderfully!!! Its good to know there is a place where I can come if I have questions. Your help is much apprecited :)
    See more | Go to post

    Leave a comment:


  • kwstriker299
    started a topic Loop through all records in a table

    Loop through all records in a table

    Hello All--

    I am trying to loop through all the records in a table named: tbl_Scan_Index. I am using MS Access 2003. Here is my code(VBA):


    Code:
    Dim drawer As Integer
    Dim Folder As Integer
    Dim msg As String
    Dim count As Integer
    
    drawer = 11
    Folder = 1
    
    Dim DB As Database
    Dim rst As DAO.Recordset
    
    Set DB = CurrentDb()
    Set rst = DB.OpenRecordset("tbl_Scan_Index")
    ...
    See more | Go to post
No activity results to display
Show More
Working...