Hewlett Packard Interview Question for Applications Developers
- 0of 0 votes
I wanted to know if someone knows how to solve this algorithm in C#!!!- andrew.coleman330 January 24, 2014 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.
// num1 = 123456
// num2 = 654321
// result = 777777
// Please use either String or char*
char *yourAdd (yourQueue *num1, yourStack *num2)
char *result = 0;
// Your code.
void main(int argc, _TCHAR* argv)
yourQueue *num1; //should only be able to push 0-9. num1->push(10) is invalid
yourStack *num2; //should only be able to push 0-9. num2->push(10) is invalid
char *result = yourAdd(num1, num2);
printf("result: %s\n", result);
| Report Duplicate | Flag | PURGE
Hewlett Packard Applications Developer Algorithm
Country: United States
Interview Type: Written Test
Open Chat in New Window