No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
13 Posted Topics
Almost got this program to work. Still have one error but not sure how to fix. It is using a linked list class for storing nodes. Here is the code: [CODE]// functions use by main void mergesort(linked_list& list); // Merges sorted list dl1 and dl2 into a sorted list dl … | |
Re: [QUOTE=Day Brown;286276]for what purpose? And why not just store and add the hex, then if you want convert only the answer to dec for std out.[/QUOTE] Did anyone ever figure out why this did not work? | |
I am having trouble trying to get this machine language program to work with pep/8. Write a machine language program to input two one-digit numbers from the user, add them, and output the one-digit sum. Beacuse this program is at the machine language level you only should use character input, … | |
Having trouble where to go next on this program: 1. If n is even, then you may give back exactly n/2 bears. 2. If n is divisible by 3 or 4, then you may multiply the last two digits of n and give back this many bears. By the way, … | |
Having trouble understanding O-notation. This is the question: 10. The approximate number of iterations of an algorithm with data size N is determined to be: 1 + 2 + 3 + ... + N a. Write a table that shows N and the number of iterations for the first 10 … | |
I have an assignment dealing with algorithms and Big O notation. I am a little confusded about this notation stuff. Here are a few of the questions on the assignment: What is the O-notation for the following code? [code]cin >> N; for (int count = 1; count <= N; count++) … | |
I have just started to learn about stacks and have been scouring the net for information. I am having trouble coming up with an answer for this question: Suppose you were asked to add a function CountStack to the stack ADT that would return the number of items in the … | |
I am having trouble trying to implement my recursive method for inserting into a linked list. I made the recursive method private because it needs acces to the head pointer. Not sure where to go from here . Any help would be appreciated. Here is the code. The .h file: … | |
I am having a problem with a recursion problem. I have been reading alot of threads on this subject here and other places. I think I understand what recursion is. I am just having a problem trying to figure out this problem. I am suppose to write a helper function … | |
I have been working on this program awhile and I am almost done with it except for trying to get the output to look like what instructor wants. Here how the output should look: [PHP]BREAKING DOWN: list = DUMP: (size = 4, first = 4, last = 3) DUMP: head … | |
Can someone point me in the right direction on implementing a merge sort. Here is what the main program will look like. THanks. [CODE]int main(void) { int ar[100]; int i, v, len; for (i=0; i<100; i++) { cout << "enter a number (-1 to quit): "; cin >> v; if … | |
I am having trouble coming up with code for removing a node in a binary search tree. This is what I have so far: [CODE] void remove(int n) { node *current=root; node *gptr; while(current != NULL){ if(n<current->key){ gptr=current; current=current->left; }else if(n>current->key){ gptr=current; current=current->right; }else if(n==current->key){ if(gptr->right->key==n){ cout<<"1st ==key = "<<gptr->key<<endl; … | |
I am having a very hard time trying to solve this problem.Here are the instructions to the assignment: Implement a Priority Queue using a heap. The heap should be implemented as a class that has a private member which is an array. The array is statically allocated and the size … |
The End.