Subject: Data Structures and Algorithms, C++ please help in this take-home quiz. need full marks please double-check ans
Posted: Fri Jun 10, 2022 11:55 am
Subject: Data Structures and Algorithms, C++ please help
in this take-home quiz. need full marks please double-check answers
to make sure it's correct and complete. will give upvote. make sure
it doesn't exceed word limit, 10% lenience on the word
limit.
Question 17 (3 Marks) Can you briefly describe what the function below does in plain English (word limit: 100)? class Node { public: int data; Node* next; }; int func (Node* node, int number) { if (node) { if (node->data > 0) - return func (node->next, number) node->data; else if (node->data < 0) return func (node->next, number) + node->data; else return func (node->next, number + node->data) + number; } } return 0;
in this take-home quiz. need full marks please double-check answers
to make sure it's correct and complete. will give upvote. make sure
it doesn't exceed word limit, 10% lenience on the word
limit.
Question 17 (3 Marks) Can you briefly describe what the function below does in plain English (word limit: 100)? class Node { public: int data; Node* next; }; int func (Node* node, int number) { if (node) { if (node->data > 0) - return func (node->next, number) node->data; else if (node->data < 0) return func (node->next, number) + node->data; else return func (node->next, number + node->data) + number; } } return 0;