C2 Min Read LetuscrackonJune 8, 2024 Function swapChildren function swapChildren: The function/method swapChildren accepts two arguments root and X. The root is a pointer to…