<prompt> Andika suluhisho katika C kwa tatizo lifuatalo: Kutokana na mizizi ya binary search mti BST na duplicates, kurudi mode s yote yaani, mara nyingi kutokea kipengele ndani yake. Kama mti ina zaidi ya mode moja, kurudi yao katika utaratibu wowote. Fikiria BST ni maalum kama ifuatavyo: - kushoto subtree ya node ina nodes tu na funguo ndogo au sawa na ufunguo wa node. - kulia subtree ya node ina nodes tu na funguo kubwa au sawa na ufunguo wa node. - Wote kushoto na kulia subtrees lazima pia kuwa binary search miti.  <response>: Heres a possible solution for the given problem:cppclass Solution public: vector findModeTreeNode root unordered_map freq; frequency map int maxFreq 0; maximum frequency so far traverseroot, freq, maxFreq; traverse the tree and update the frequency map vector modes; output vector for auto key, count : freq loop over the frequency map if count maxFreq if the current key has maximum frequency modes.push_backkey; add it to the output return modes; private: void traverseTreeNode root, unordered_map freq, int maxFreq if !root return; traverseroot-left, freq, maxFreq; maxFreq maxmaxFreq, freqroot-val; update the frequency of the current node traverseroot-right, freq, maxFreq; ;The findMode function takes a TreeNode argument and returns a vector containing the modes of the BST. It initializes an empty frequency map freq and a maximum frequency variable maxFreq. Then, it calls the traverse function to traverse the tree in an inorder fashion and update the frequency map and maximum frequency.The traverse function is a helper function that takes a TreeNode argument, a reference to the frequency map, and a reference to the maximum frequency variable. It performs an inorder traversal of the tree and updates the frequency map and maximum frequency for each node.Finally, the findMode function loops over the frequency map and adds the keys with maximum frequency to the output vector modes, then returns it. Note that were using structured bindings auto key, count to simplify the loop over the frequency map. 