User Profile
Collapse
-
i figured ........now its working... -
it solves the SDT(syntax directed translation)
we have to solve
Num -> Digit Num.val := Digit.val
Num -> Num1 Digit Num.val := 3*Num1.val + D.val
Digit -> 0 Digit.val := 1
Digit -> 1 Digit.val := 0
i have written this program it compiles succesful but when i try it to run my Dev C++ compiler says "Program stop working"...Leave a comment:
-
Problem in running program but the code compiles succesfully
...Code:#include <iostream> #include <cstdlib> using namespace std; char LA; char* str; void R(int R_i, int& R_s); void Digit(int& Digit_val); void input_error(); char token() { return *str++; } void Num(int& Num_val) { int Digit_value, R_i, R_s; Digit(Digit_value); -
void fixDown3(Item a[], int k, int N)
{ int j;
while (3*k <= N)
{ c3++;
j = 3*k;
if (j < N)
{ if (a[3*k-1]>a[j]) j--;
if (a[3*k+1]>a[j]) j++;
}
if (!(a[k]< a[j])) break;
exch(a[k], a[j]); k = j;
}
}void heapsort3(Item...Leave a comment:
-
Ternary Heapsort algorithm
i need help to write the code for ternary fix down approach and ternary heapsort
can anyone give me link or just give me some help. -
Problem with heap sort
I have code which counts the number of comparison of binary ternary and quad trees what i think the code for ternary and quad trees
fixDown3 and fixDown4 are off. If you test them on some data (say run a heapSort based on them, you'll see that your positional expressions are all off).
For example, take a look at fixDown4.
template <class Item>
void fixDown4(Item a[], int k, int N)
{ int... -
C
Can someone help to write a program
how to convert L=(A(B C))
to (A.(B.(C.())))
No activity results to display
Show More
Leave a comment: