I need help please anyone...appreciated

im trying to time stamp this code to plot a graph base on different array size
eg 100 0.454sec
1000 0.467sec
etc
but so far im only getting 0's no matter the array size
and id also want to find out the amount of comparisons made before the search key is found
DESPARATELY need help
thanks

Use code tags. Do so by clicking go advanced then clicking the icon at the top. It'll look like this: (And by the way, if you are using a Binary Search Tree, my code may be helpful to you, because at first glance, your code seems to be very wrong. But if you're using a BTree then nevermind). Also, the code I posted below only works for ints, so if you wanted to implement it for other types, you'd have to use the equals method, compareTo, and possibly others.

its not a binary search tree.....just a simple binary search
plz help :(

I already did help. I only posted that code because I thought it was relevant and I had already written it for personal use. So I'm not going to write the code for you. However, here's how you would do this in pseudocode:

while your value is not found, do the following:
1. Search the root. If the root contains the value you want, return that node and quit.
2. Search the left subtree.
3. Search the right subtree.

Since every "left subtree" has a root, and every "right subtree" has a root, the above algorithm will work. Go make a method, write the code that will follow that algorithm, and then re-run your program. Hint: the method makes recursive calls to itself in order to search the left subtree and the right subtree.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...