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
calrification on info. and in find
Topic Started: Feb 21 2014, 10:05 AM (59 Views)
jdomi008
No Avatar

I know what info is for but I just need a little clarification on things. when we want to insert to the bst, what parameters do we pass in? a one meaning its frequency is one? or?

say we wanna pass in the word "hello" will it look like

bst.insert("hello", 1);

also for the bst find function. the return type is ElementType, int in our case. by looking at the lecture slides, it looks like the function finds the key and returns the info and if it cant find it, it inserts it with 0 as the info then finds it which makes it return 0. is that the desired function?

and we dont need to define operator [] for this one right?

any help is appreciated! thanks!
Offline Profile Quote Post Goto Top
 
ssepa001
Member Avatar
Sam
that is how I am doing it,passing everything with 1.. and no [] operator here, would make no sense
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Homework 6 · Next Topic »
Add Reply