Given the following tree traversal methods: Pre-order: Visi…

Given the following tree traversal methods: Pre-order: Visit the root first, then recursively visit all subtrees. In-order (binary tree):  Visit the Left subtree, root, then the right subtree. Post-order: Recursively visit all subtrees, then visit the root.  For each of the following scenarios, select the most appropriate tree traversal method to achieve the desired outcome: A binary search tree stores player scores in its nodes. You want to display scores in ascending order. A tree represents a file system hierarchy. You want to display the file system structure starting from the root, including all  subdirectories and files, mirroring the natural hierarchical listing and exploration of files. A tree represents a file system hierarchy. You want to calculate the total size of a directory, including its subdirectories and files. In Java, garbage collection automatically reclaims memory occupied by objects that are no longer referenced. A tree is used to manage object references, where each node represents an object, and each object can reference other objects. You want to safely delete an object along with all objects it references.     

Consider a singly LinkedList with only the head pointer. The…

Consider a singly LinkedList with only the head pointer. The task is to iterate through the LinkedList to print out all the node values. However, there is uncertainty about whether the LinkedList contains a cycle. If a cycle is present, the iteration will not terminate. Given the structure of each node: class Node {    int val;    Node next;        // constructor    Node(int value, Node nextNode){        val = value;        next = nextNode;    }} Select ALL applicable solutions to detect a cycle in the singly LinkedList. Assume the LinkedList is not null, and there is at least one element in the LinkedList. Example of a List contains a cycle:

Sam often eats large amounts of food in a short period of ti…

Sam often eats large amounts of food in a short period of time, feeling out of control while doing so. Afterward, she secretly forces herself to vomit and sometimes uses laxatives to prevent weight gain. She is deeply concerned about her body shape and weight. Samantha is most likely experiencing symptoms of: