Welcome Guest [Log In] [Register]
Welcome to UCR CS 14 Klefstad.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Root
Topic Started: Feb 18 2014, 06:05 PM (81 Views)
aelsi001
No Avatar

Which string should be our root?
Offline Profile Quote Post Goto Top
 
ssepa001
Member Avatar
Sam
we are inserting everything as it is in the file, so the first string in file is your root. this way you can compare unsorted and sorted file for performance
Offline Profile Quote Post Goto Top
 
aelsi001
No Avatar

the first word in my random file starts with an 'A'
Offline Profile Quote Post Goto Top
 
ssepa001
Member Avatar
Sam
aelsi001
Feb 18 2014, 08:16 PM
the first word in my random file starts with an 'A'
yea that's true... Professor klefstad said to use those files so it seems that its okay. we'll see if he drops by and confirm
Offline Profile Quote Post Goto Top
 
klefstad
No Avatar
Administrator
The first word you insert will be the root. It just happens to begin with an A, that is unfortunate, but that is what can happen when the keys are random (not sorted).

The rest of the tree will not be skewed.

If we were doing rotations, the tree would improve as we insert new keys and do rotations.

Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Homework 6 · Next Topic »
Add Reply