int number_to_shortlist(shared_ptr> root) Returns the total number of applicants you can shortlist: CODE IS GIVEN BELOW vector in_order(shared_ptr> root) Returns an array of keys traversed
int number_to_shortlist(shared_ptr> root) Returns the total number of applicants you can shortlist: CODE IS GIVEN BELOW
vector in_order(shared_ptr> root) Returns an array of keys traversed in-order from the root. Note that you can only shortlist a limited number of applicants; therefore, you need to return the same amount of keys as the number of applicants that can be shortlisted.
vector level_order(shared_ptr> root) Returns a list of keys traversed in level-order from the root. Note that you can only shortlist a limited number of applicants; therefore, you need to return the same amount of keys as the number of applicants that can be shortlisted.
CODE in order and level order while keeping the maximum number of applicants that can be shortlisted using the numbertoshortlist function in mind and return the inorder and levelorder vector for both. code this in c++
starter code:
template
int AVL
if (root == nullptr){
return 0;
}
return 1 + number_to_shortlist(root->right);
}
template
struct node {
S fullName;
T workExperience;
string gender;
shared_ptr
shared_ptr
int height;
node(T w, S n, C g) {
this->fullName = n;
this->workExperience = w;
this->gender = g;
left = NULL;
right = NULL;
height = 1;
}
};
// AVL Class (This will be used for both BST and AVL Tree implementation)
template
class AVL {
shared_ptr
bool isAVL;
public:
AVL(bool);
void insertNode(shared_ptr
void deleteNode(T k);
shared_ptr
shared_ptr
int height (shared_ptr
// Part 3 Functions
int number_to_shortlist(shared_ptr
vector
vector
vector
vector
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started