andrew.coleman330
BAN USER- 0of 0 votes
AnswerI wanted to know if someone knows how to solve this algorithm in C#!!!
- andrew.coleman330 in United States for Andrew
I do not know this programming language that well and need it converted, you do not have to solve the algorithm but it would help if you can!
// You are free to implement the solution in C, C++ or C#.
// You are given a set of numbers stored in your own implementation of queue
// and another set of numbers stored in your own implementation of stack.
// The goal is to calculate the sum of those two sets of values.
// NOTE: You must implement your own Queue and Stack.
//
// Inputs:
// num1 = 123456
// num2 = 654321
// Output:
// result = 777777
#include <stdio.h>
#include <tchar.h>
//yourQueue implementation
//yourStack implementation
// Please use either String or char*
char *yourAdd (yourQueue *num1, yourStack *num2)
{
char *result = 0;
// Your code.
return result;
}
void main(int argc, _TCHAR* argv[])
{
yourQueue *num1; //should only be able to push 0-9. num1->push(10) is invalid
num1->push(1);
num1->push(2);
num1->push(3);
num1->push(4);
num1->push(5);
num1->push(6);
yourStack *num2; //should only be able to push 0-9. num2->push(10) is invalid
num2->push(1);
num2->push(2);
num2->push(3);
num2->push(4);
num2->push(5);
num2->push(6);
char *result = yourAdd(num1, num2);
printf("result: %s\n", result);
}| Report Duplicate | Flag | PURGE
Hewlett Packard Applications Developer Algorithm