No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E < -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; … | |
Hi there, I am having trouble understand how they derive these running times for the code in the image below. [http://i.imgur.com/usK9U.jpg](null) I am having trouble especally with log n running times, how are they derived? especially the bottom left slide. If someone can shed some light on this, I would … | |
Hello, java noob here, in the code below, why is it when declaring a class that '<E>' is used in stead of the brackets ? '(E)'?? public class LLStack**<E>** implements Stack<E>{ private Node**<E> **head ; public LLStack ( ){ head = nul l ;} //creates an empty stack public boolean … | |
Hey, just wanna say thanks in advance with the help. [code] void backwards(struct node *headp){ int n=0; /* length */ int i,j; /* counters */ struct node *p=headp; /* find length */ while( p->next !=NULL ) { n++; p=p->next; } printf(“%d\n”, p->number); /* print TAIL */ for(i=n-1; i>=1; i--) { … | |
First of all I would like to say that I am a super newb at C, and would appreciate any help possible. I have to read a text file of words and sort them in lexicographical order (alpha order), I tried using the bubble sort and got this error on … | |
Whats the difference between: pp = malloc(m*sizeof(int)) <--- I understand this and pp = **int malloc (m*sizeof(int)) <--- but not this ? | |
The Function double *solve( double a[ ][N], double b[ ]) what does the pointer notation * represent in front of solve? | |
Heres the problem, Ill try my best to explain this: If your given a 5x5 array whicih looks like: 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 Basically in each column below any … | |
Can someone please explain to me how dynamic memory allocation actually works? For example whast going on in the piece of code written below? If you can respond asap, that would be great. Thanks in advance. [code]p = (float *) malloc ( n * sizeof( float ));[/code] And whats the … | |
Each of the following program segments might have syntax, logic or other kinds of errors. If there are errors, correct, otherwise answer "no error". Assume all function headers are correct. Function copy_array receives an integer array a and its size length, as parameters. It copies the array a into another … | |
[code] _ _ _ _ function2(_ _ _ _ _ _ _ _ _ _ _ ); main{ int n[]= {4, 5, 6}; int *kptr ; kptr = function2( n ) ; } [/code] Fill in the blanks and you get: [code]int *function2( int array[ ]); or int *function2( int … | |
My Question is regarding the code written below. If you look at the function called "function" when 'a' is passed to the function and the function "function" is evaluated. I was wondering what the return value would be for the first pass when (a =2), my questin specifcaly is that … |
The End.